File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,17 +6,19 @@ const getMenuList = (list: MenuRoute[], basePath?: string): MenuRoute[] => {
66 if ( ! list ) {
77 return [ ] ;
88 }
9- return list . map ( ( item ) => {
10- const path = basePath ? `${ basePath } /${ item . path } ` : item . path ;
11- return {
12- path,
13- title : item . meta ?. title ,
14- icon : item . meta ?. icon || '' ,
15- children : getMenuList ( item . children , path ) ,
16- meta : item . meta ,
17- redirect : item . redirect ,
18- } ;
19- } ) ;
9+ return list
10+ . map ( ( item ) => {
11+ const path = basePath ? `${ basePath } /${ item . path } ` : item . path ;
12+ return {
13+ path,
14+ title : item . meta ?. title ,
15+ icon : item . meta ?. icon || '' ,
16+ children : getMenuList ( item . children , path ) ,
17+ meta : item . meta ,
18+ redirect : item . redirect ,
19+ } ;
20+ } )
21+ . filter ( ( item ) => item . meta && item . meta . hidden !== true ) ;
2022} ;
2123
2224const renderIcon = ( item ) => {
You can’t perform that action at this time.
0 commit comments