소스 검색

Update generator-routers.ts

lex 1 년 전
부모
커밋
9806921c1f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/router/generator-routers.ts

+ 1 - 1
src/router/generator-routers.ts

@@ -33,7 +33,7 @@ export const routerGenerator = (routerMap: any, parent?: any): any[] => {
       path:
         item.path.indexOf('/') > -1 ? item.path : `${(parent && parent.path) || ''}/${item.path}`,
       // 路由名称,建议唯一
-      name: item.name || '',
+      name: item.path || '',
       // 该路由对应页面的 组件
       component: asyncRoute[item.component],
       // meta: 页面标题, 菜单图标, 页面权限(供指令权限用,可去掉)