|
|
@@ -53,6 +53,8 @@ export default {
|
|
|
const findConfig = this.config.find(item => item['名称'] === name)
|
|
|
if (findConfig && (renderType === 1 || renderType === 2)) {
|
|
|
this.loadImage(findConfig['文件路径'])
|
|
|
+ } else if (findConfig && renderType === 0) {
|
|
|
+ this.loadPDF(findConfig['文件路径'])
|
|
|
}
|
|
|
})
|
|
|
console.log('data', data)
|
|
|
@@ -68,13 +70,19 @@ export default {
|
|
|
|
|
|
loadImage(path) {
|
|
|
console.log('loadImage', path)
|
|
|
- if(!this.imgViewer?.isShown){
|
|
|
+ if (!this.imgViewer?.isShown) {
|
|
|
+ this.imgViewer = this.$viewerApi({
|
|
|
+ images: [`/static${path}`],
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ loadPDF(path) {
|
|
|
+ console.log('loadImage', path)
|
|
|
+ if (!this.imgViewer?.isShown) {
|
|
|
this.imgViewer = this.$viewerApi({
|
|
|
images: [`/static${path}`],
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
}
|