commit
This commit is contained in:
@@ -43,14 +43,16 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="19" class="preview-content-col">
|
<el-col :span="19" class="preview-content-col">
|
||||||
<div class="preview-content-wrapper">
|
<div class="preview-content-wrapper">
|
||||||
<div class="preview-main-content">
|
<div class="preview-main-content" v-loading="officeLoading" element-loading-text="拼命加载中">
|
||||||
<el-image
|
<el-image
|
||||||
v-if="file?.suffix === 'jpg' || file?.suffix === 'png' || file?.suffix === 'jpeg' || file?.suffix === 'gif'"
|
v-if="file?.suffix === 'jpg' || file?.suffix === 'png' || file?.suffix === 'jpeg' || file?.suffix === 'gif'"
|
||||||
:src="file.downloadPath"
|
:src="file.downloadPath"
|
||||||
:fit="'cover'"
|
:fit="'cover'"
|
||||||
@click.stop="$commonUtil.previewFile(file)"
|
@click.stop="$commonUtil.previewFile(file)"
|
||||||
|
@load="officeLoading = false"
|
||||||
|
@error="officeLoading = false"
|
||||||
></el-image>
|
></el-image>
|
||||||
<div v-else v-loading="officeLoading" element-loading-text="拼命加载中" style="height: 100%">
|
<div v-else style="height: 100%">
|
||||||
<iframe v-if="['doc', 'docx', 'xls', 'xlsx'].includes(file?.suffix)"
|
<iframe v-if="['doc', 'docx', 'xls', 'xlsx'].includes(file?.suffix)"
|
||||||
frameborder="0"
|
frameborder="0"
|
||||||
width="100%"
|
width="100%"
|
||||||
@@ -137,10 +139,13 @@ module.exports = {
|
|||||||
this.file = this.fileList[this.defaultActive]
|
this.file = this.fileList[this.defaultActive]
|
||||||
},
|
},
|
||||||
menuSelect(index) {
|
menuSelect(index) {
|
||||||
|
index = Number(index)
|
||||||
this.defaultActive = Number(this.defaultActive)
|
this.defaultActive = Number(this.defaultActive)
|
||||||
|
if(index !== this.defaultActive) {
|
||||||
|
this.officeLoading = true
|
||||||
|
}
|
||||||
this.defaultActive = index
|
this.defaultActive = index
|
||||||
this.file = this.fileList[index]
|
this.file = this.fileList[index]
|
||||||
this.officeLoading = true
|
|
||||||
},
|
},
|
||||||
onPreView(item, index) {
|
onPreView(item, index) {
|
||||||
this.file = item
|
this.file = item
|
||||||
|
|||||||
Reference in New Issue
Block a user