File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -117,14 +117,17 @@ export const usePermissionStore = defineStore({
117
117
118
118
// !Simulate to obtain permission codes from the background,
119
119
// this function may only need to be executed once, and the actual project can be put at the right time by itself
120
+ let routeList : AppRouteRecordRaw [ ] = [ ] ;
120
121
try {
121
122
this . changePermissionCode ( '1' ) ;
122
- } catch ( error ) { }
123
+ routeList = ( await getMenuListById ( { id : paramId } ) ) as AppRouteRecordRaw [ ] ;
124
+ } catch ( error ) {
125
+ console . error ( error ) ;
126
+ }
123
127
124
128
if ( ! paramId ) {
125
129
throw new Error ( 'paramId is undefined!' ) ;
126
130
}
127
- let routeList = ( await getMenuListById ( { id : paramId } ) ) as AppRouteRecordRaw [ ] ;
128
131
129
132
// Dynamically introduce components
130
133
routeList = transformObjToRoute ( routeList ) ;
You can’t perform that action at this time.
0 commit comments