vue,如何每次访问同样路由都可以刷新
作者:互联网
利用v-if控制:
<router-view v-if="isRouterAlive"></router-view>
data() {
return {
isRouterAlive: true
}
},
methods:{
reload () {
this.isRouterAlive = false
this.$nextTick(() => (this.isRouterAlive = true))
},
//每次点击调用
get01(val) {
this.reload()
}
标签:vue,false,methods,每次,isRouterAlive,reload,刷新,true,路由 来源: https://www.cnblogs.com/hhthtt/p/15764448.html