vue 路由钩子函数 刷新当前路由

refresh.vue

export default {
  beforeRouteEnter (to, from, next) {
    this.$nextTick(() => {
      next(vm => {
        vm.$router.replace(from.path)
      })
    })
  }
}

  

使用:

this.$router.replace('上面的vue页面', () => {})