<template>
<view>
<web-view :src="url":update-title="false"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
url:""
}
},
onLoad() {
var time = new Date().getTime();
this.url = '' + time
},
methods: {
}
}
</script>
在this.url里面使用你想要外链的地址
通过在URL中添加一个动态参数(如时间戳),每次生成的URL都是唯一的,浏览器在加载时会认为这是一个新的请求,从而不会使用缓存中的旧内容。这对于需要展示动态内容或避免缓存问题的场景非常有用。
1035

被折叠的 条评论
为什么被折叠?



