修复路由问题
This commit is contained in:
parent
7991950025
commit
2c72992390
|
@ -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);
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue