Commit a6c26ec8 authored by youjie's avatar youjie

修复 iframe 缓存机制

parent 74bd9d8e
......@@ -12,7 +12,7 @@
</el-tooltip>
</div>
</div>
<iframe name="myTemplateUrl" :src="Url"
<iframe id="myTemplateUrl" name="myTemplateUrl" :src="Url"
class="TemplateIframe">
</iframe>
</div>
......@@ -42,9 +42,14 @@
},
},
mounted() {
window.onload = function () {
onloadIfram()
}
},
methods: {
onloadIfram() {
document.getElementById('#myTemplateUrl').contentWindow.location.reload();
},
close() {
this.$emit('close')
}
......
......@@ -295,6 +295,10 @@
},
methods: {
// 更新 iframe
onloadIfram() {
document.getElementById('#myTemplateUrl').contentWindow.location.reload();
},
closeIframe() {
this.dialogPptistVisible = false
},
......@@ -663,6 +667,9 @@
if (document.all.myIframe) {
document.all.myIframe.src = this.myIframeUrl + `&t=${new Date().getTime()}`
}
window.onload = function () {
onloadIfram()
}
},
watch: {
dataAll: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment