現在のルートをリフレッシュするためにフック関数をルーティングVUE

refresh.vue

エクスポートデフォルト{ 
  beforeRouteEnter(次の、からの){ 
    この。$ nextTick(()=> { 
      次(VM => { 
        VM。$のrouter.replace(from.path)
      })
    })
  } 
}

  

使用します。

この。$ router.replace( '上記VUEページ'、()=> {})

おすすめ

転載: www.cnblogs.com/sxdjy/p/12221193.html