|
|
|
|
@ -8,7 +8,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else-if="type === 'pdf'">
|
|
|
|
|
<iframe :src="url" frameborder="0" style="width: 100%;height: 100%;" />
|
|
|
|
|
<VueOfficePdf :src="url" style="height: 100vh;" />
|
|
|
|
|
<!-- <VueOfficePdf :src="url" style="height: 100vh;" />-->
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else-if="['png', 'jpg', 'jpeg', 'gif', 'webp', 'svg'].indexOf(type) !== -1">
|
|
|
|
|
<el-image ref="elImage" fit="contain" :preview-src-list="[url]" :src="url" style="width: 100vw;height: 100vh;" alt="" @load="loadImg" />
|
|
|
|
|
@ -72,6 +72,8 @@ export default {
|
|
|
|
|
this.url = window.decodeURIComponent(this.$route.query.url ?? '')
|
|
|
|
|
}
|
|
|
|
|
this.type = this.$route.query.type || this.url.split('.').at(-1)
|
|
|
|
|
if (this.type === 'pdf') {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|