- 在App.vue中加入
created() {
if (this.$router.path !== "/home" || this.$router.path !== "/") {
this.$router.replace("/");
}
}
-
但是不知道为啥会有一个报错,但不影响项目运行
bug是因为vue有bug 解决:
npm i vue-router@3.0 -S
created() {
if (this.$router.path !== "/home" || this.$router.path !== "/") {
this.$router.replace("/");
}
}
但是不知道为啥会有一个报错,但不影响项目运行
bug是因为vue有bug 解决:
npm i vue-router@3.0 -S
本文标题:vue刷新重定向某个页面(解决Uncaught (in prom
本文链接:https://www.haomeiwen.com/subject/hpqngctx.html
网友评论