📝 fix example bug in doc demo (#2234)
This commit is contained in:
parent
07bd541880
commit
3a365382da
|
|
@ -679,10 +679,10 @@ const childrenPath = ['/app1', '/app2'];
|
|||
router.beforeEach((to, from, next) => {
|
||||
if (to.name) {
|
||||
// There is a name attribute, indicating that it is the route of the main project
|
||||
next();
|
||||
return next();
|
||||
}
|
||||
if (childrenPath.some((item) => to.path.includes(item))) {
|
||||
next();
|
||||
return next();
|
||||
}
|
||||
next({ name: '404' });
|
||||
});
|
||||
|
|
|
|||
|
|
@ -687,10 +687,10 @@ const childrenPath = ['/app1', '/app2'];
|
|||
router.beforeEach((to, from, next) => {
|
||||
if (to.name) {
|
||||
// 有 name 属性,说明是主应用的路由
|
||||
next();
|
||||
return next();
|
||||
}
|
||||
if (childrenPath.some((item) => to.path.includes(item))) {
|
||||
next();
|
||||
return next();
|
||||
}
|
||||
next({ name: '404' });
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user