mirror of
https://github.com/Tencent/tdesign-vue-next-starter.git
synced 2024-11-10 10:28:24 +08:00
parent
9d8bf86059
commit
8194b3d253
|
@ -37,9 +37,13 @@ export const usePermissionStore = defineStore('permission', {
|
|||
}
|
||||
},
|
||||
async restoreRoutes() {
|
||||
this.removeRoutes.forEach((item: RouteRecordRaw) => {
|
||||
router.addRoute(item);
|
||||
// 不需要在此额外调用initRoutes更新侧边导肮内容,在登录后asyncRoutes为空会调用
|
||||
this.asyncRoutes.forEach((item: RouteRecordRaw) => {
|
||||
if (item.name) {
|
||||
router.removeRoute(item.name);
|
||||
}
|
||||
});
|
||||
this.asyncRoutes = [];
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user