wanggaokun před 11 měsíci
rodič
revize
9e45258fa3
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      src/utils/index.ts

+ 2 - 1
src/utils/index.ts

@@ -178,7 +178,8 @@ export function getMenuPath(menuList: Menu.MenuOptions[], path?: string) {
   let newMenuList: Menu.MenuOptions[] = JSON.parse(JSON.stringify(menuList))
   return newMenuList.map(item => {
     if (path) {
-      item.path = `${path}/${item.path}`
+      const newPath = path.replace(/none|\/none/g, '')
+      item.path = `${newPath}/${item.path}`
     }
     item.children?.length && (item.children = getMenuPath(item.children, item.path))
     return item