[update] 修改bug80750

This commit is contained in:
lideqin
2024-02-02 13:58:01 +08:00
parent ff0e73bb55
commit 15305a8b65
@@ -11,8 +11,10 @@
<div class="content">
<!-- 左侧文件预览 -->
<div class="content-left">
<iframe v-if="iframeSrc" :src="iframeSrc" width="100%" frameborder="0"></iframe>
<a-empty class="empty-file" v-else :description="$t('noFileAvailableForPreview')"></a-empty>
<a-spin :spinning="leftLoading" class="left-spin">
<iframe v-if="iframeSrc" :src="iframeSrc" width="100%" frameborder="0"></iframe>
<a-empty class="empty-file" v-else :description="$t('noFileAvailableForPreview')"></a-empty>
</a-spin>
</div>
<!-- 右侧表单区域 -->
<div class="content-right">
@@ -56,6 +58,7 @@ export default {
title: '',
visible: false,
confirmLoading: false,
leftLoading: false,
form: this.$form.createForm(this),
model: {},
labelCol: {
@@ -86,15 +89,21 @@ export default {
},
methods: {
add (fileId) {
this.leftLoading = true
this.getFileInfo(fileId).then(res => {
this.handlePreview(res)
}).finally(() => {
this.leftLoading = false
})
this.visible = true
this.form.resetFields()
},
edit (fileId, record, index) {
this.leftLoading = true
this.getFileInfo(fileId).then(res => {
this.handlePreview(res)
}).finally(() => {
this.leftLoading = false
})
this.visible = true
this.index = index