Browse Source

Update generator-routers.ts

lex 1 năm trước cách đây
mục cha
commit
9806921c1f
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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: 页面标题, 菜单图标, 页面权限(供指令权限用,可去掉)