提交 2c729923 编写于 作者: Q q4speed

修复路由问题

上级 79919500
......@@ -73,7 +73,7 @@
return '/api/' + item.id;
},
router: function (item) {
return {name: 'fucPlan', params: {projectId: item.id, projectName: item.name}}
return {name: 'ApiTestList', params: {projectId: item.id, projectName: item.name}}
}
},
testRecent: {
......
......@@ -59,11 +59,11 @@
}
},
beforeRouteEnter(to, from, next) {
next(self => {
self.testId = to.params.testId;
self.search();
});
watch: {
'$route'(to) {
this.testId = to.params.testId;
this.search();
}
},
methods: {
......
......@@ -63,11 +63,11 @@
}
},
beforeRouteEnter(to, from, next) {
next(self => {
self.projectId = to.params.projectId;
self.search();
});
watch: {
'$route'(to) {
this.projectId = to.params.projectId;
this.search();
}
},
methods: {
......
......@@ -34,7 +34,9 @@
},
watch: {
'$route'(to) {
this.activeIndex = to.matched[0].path;
if (to.matched.length > 0) {
this.activeIndex = to.matched[0].path;
}
this.handleSelect(this.activeIndex);
}
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册