[update] 修改bug80750
This commit is contained in:
@@ -11,8 +11,10 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<!-- 左侧文件预览 -->
|
<!-- 左侧文件预览 -->
|
||||||
<div class="content-left">
|
<div class="content-left">
|
||||||
<iframe v-if="iframeSrc" :src="iframeSrc" width="100%" frameborder="0"></iframe>
|
<a-spin :spinning="leftLoading" class="left-spin">
|
||||||
<a-empty class="empty-file" v-else :description="$t('noFileAvailableForPreview')"></a-empty>
|
<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>
|
||||||
<!-- 右侧表单区域 -->
|
<!-- 右侧表单区域 -->
|
||||||
<div class="content-right">
|
<div class="content-right">
|
||||||
@@ -56,6 +58,7 @@ export default {
|
|||||||
title: '',
|
title: '',
|
||||||
visible: false,
|
visible: false,
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
|
leftLoading: false,
|
||||||
form: this.$form.createForm(this),
|
form: this.$form.createForm(this),
|
||||||
model: {},
|
model: {},
|
||||||
labelCol: {
|
labelCol: {
|
||||||
@@ -86,15 +89,21 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
add (fileId) {
|
add (fileId) {
|
||||||
|
this.leftLoading = true
|
||||||
this.getFileInfo(fileId).then(res => {
|
this.getFileInfo(fileId).then(res => {
|
||||||
this.handlePreview(res)
|
this.handlePreview(res)
|
||||||
|
}).finally(() => {
|
||||||
|
this.leftLoading = false
|
||||||
})
|
})
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.form.resetFields()
|
this.form.resetFields()
|
||||||
},
|
},
|
||||||
edit (fileId, record, index) {
|
edit (fileId, record, index) {
|
||||||
|
this.leftLoading = true
|
||||||
this.getFileInfo(fileId).then(res => {
|
this.getFileInfo(fileId).then(res => {
|
||||||
this.handlePreview(res)
|
this.handlePreview(res)
|
||||||
|
}).finally(() => {
|
||||||
|
this.leftLoading = false
|
||||||
})
|
})
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.index = index
|
this.index = index
|
||||||
|
|||||||
Reference in New Issue
Block a user