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()
}