-
+
+
+
@@ -73,6 +75,7 @@ export default {
visible: false,
confirmLoading: false,
form: this.$form.createForm(this),
+ loading: false, // iframe的加载状态
// 父表的当前行数据
data: {},
// 当前表的当前行数据
@@ -107,6 +110,10 @@ export default {
}
},
methods: {
+ // iframe加载完成
+ loadIframe () {
+ this.loading = false
+ },
add (data) {
this.type = 'add'
this.data = Object.assign({}, data)
@@ -163,9 +170,11 @@ export default {
// word文件仍使用KKFile进行预览
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}`
this.iframeSrc = url
+ this.loading = true
}
},
close () {
+ this.loading = false
this.visible = false
this.model = {}
this.index = -1
@@ -209,11 +218,18 @@ export default {
height: 100%;
display: flex;
.content-left {
+ position: relative;
width: 60%;
height: 100%;
iframe {
height: calc(100% - 20px) !important;
}
+ .iframe-loading {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ }
}
.content-right {
width: 40%;