diff --git a/src/storage/routeStorage.js b/src/storage/routeStorage.js index d2354d9d3900eb27ce314af274faf58c82c6f5a1..ef09d42b732035ad6355427a37a5228514f72759 100644 --- a/src/storage/routeStorage.js +++ b/src/storage/routeStorage.js @@ -10,7 +10,7 @@ export const useRouteStore = defineStore('route', { actions: { add(roleId){ if(roleId === '1'){ - routeArr.forEach(element => { + this.routeArr.forEach(element => { router.addRoute(element); router.addRoute('/',element); }); diff --git a/src/util/toTree.js b/src/util/toTree.js index 8e44326d55affb19e3fe64fd3a28a63f8987ae4a..c39d1c1e13538f96cafe18cf3046a2563f9c27f7 100644 --- a/src/util/toTree.js +++ b/src/util/toTree.js @@ -64,4 +64,4 @@ function FlatToTree(arr) { }) return { tree } } -// console.log(FlatToTree(flatData),'输出为树形结构') +// console.log(FlatToTree(flatData),'输出为树形结构')