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()
      }
     
posted @ 2022-01-04 22:22  fdbnf  阅读(338)  评论(0编辑  收藏  举报