vue刷新重定向某个页面(解决Uncaught (in promise) t {_name: "NavigationDuplicated", name: "NavigationDuplicate...

  • 在App.vue中加入
created() {
    if (this.$router.path !== "/home" || this.$router.path !== "/") {
      this.$router.replace("/");
    }
  }
  • 但是不知道为啥会有一个报错,但不影响项目运行


bug是因为vue有bug 解决:

npm i [email protected] -S

参考:https://blog.csdn.net/Oralinge/article/details/100546903

你可能感兴趣的:(vue刷新重定向某个页面(解决Uncaught (in promise) t {_name: "NavigationDuplicated", name: "NavigationDuplicate...)