Commit 36d1aa17 authored by youjie's avatar youjie

iframe 缓存机制

parent 1fd42e67
......@@ -18,6 +18,7 @@
</div>
</template>
<script>
export default {
props:['Url','FeaturePageType'],
data() {
......@@ -40,16 +41,23 @@
deep: true,
immediate:true
},
Url: {
handler: function (val, oldVal) {
if(document.all.myTemplateUrl){
document.all.myTemplateUrl.src = this.Url+`&t=${new Date().getTime()}`
}
window.onload = function () {
document.getElementById('#myTemplateUrl').contentWindow.location.reload();
}
},
deep: true,
immediate:true
},
},
mounted() {
window.onload = function () {
onloadIfram()
}
},
methods: {
onloadIfram() {
document.getElementById('#myTemplateUrl').contentWindow.location.reload();
},
close() {
this.$emit('close')
}
......
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