Commit 36d1aa17 authored by youjie's avatar youjie

iframe 缓存机制

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