beforeRouteEnter不能直接this.$store,可采用下面的方式

beforeRouteEnter(to, from, next) {
  const store = from.matched[0].instances.default.$store
  next()
}

[转自]:https://github.com/vuejs/vue-router/issues/1103

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-21
猜你喜欢
  • 2021-06-22
  • 2021-06-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案