level 1
一蓑烟雨329
楼主
路由设置是没有问题的
main.js // 渲染进程设置 路由
// 路由跳转Vue.prototype.$toPage = function (val, obj) {
let self = this;
if (typeof val == "object") {
obj = val; val = self.$router.path;
}
setTimeout(function () {
self.$router.push({
path: val,
query: obj || {} })
}, 0);}
index.vue文件使用路由跳转
this.$toPage('/index')
2021年03月06日 05点03分
1
main.js // 渲染进程设置 路由
// 路由跳转Vue.prototype.$toPage = function (val, obj) {
let self = this;
if (typeof val == "object") {
obj = val; val = self.$router.path;
}
setTimeout(function () {
self.$router.push({
path: val,
query: obj || {} })
}, 0);}
index.vue文件使用路由跳转
this.$toPage('/index')