diff --git a/packages/plugin-layout/src/utils/getMenuFromRoute.ts b/packages/plugin-layout/src/utils/getMenuFromRoute.ts index 5977e45e7..711f1710f 100644 --- a/packages/plugin-layout/src/utils/getMenuFromRoute.ts +++ b/packages/plugin-layout/src/utils/getMenuFromRoute.ts @@ -87,7 +87,7 @@ function formatter( } result.children = children; - delete result.path; + // delete result.path; } return result; }), diff --git a/packages/plugin-layout/test/routes/normal.ts b/packages/plugin-layout/test/routes/normal.ts index 1b3c73af3..767f2adf9 100644 --- a/packages/plugin-layout/test/routes/normal.ts +++ b/packages/plugin-layout/test/routes/normal.ts @@ -72,6 +72,7 @@ const normalMenu = [ { name: '欢迎', path: '/welcome', icon: 'testicon' }, { name: '菜单示例', + path: '/test', children: [ { name: '示例 1', path: '/test/1' }, { diff --git a/packages/plugin-layout/test/routes/prefix.ts b/packages/plugin-layout/test/routes/prefix.ts index 662658831..24da6eef0 100644 --- a/packages/plugin-layout/test/routes/prefix.ts +++ b/packages/plugin-layout/test/routes/prefix.ts @@ -63,6 +63,7 @@ const prefixMenu = [ { name: '欢迎', path: '#/$name/welcome', icon: 'testicon' }, { name: '菜单示例', + path: '#/$name/test', children: [ { name: '示例 1', path: '#/$name/test/1' }, { diff --git a/packages/plugin-layout/test/routes/simple.ts b/packages/plugin-layout/test/routes/simple.ts index 09f85d266..742c1cbd3 100644 --- a/packages/plugin-layout/test/routes/simple.ts +++ b/packages/plugin-layout/test/routes/simple.ts @@ -63,6 +63,7 @@ const simpleMenu = [ { name: '欢迎', path: '/welcome', icon: 'testicon' }, { name: '菜单示例', + path: '/test', children: [ { name: '示例 1', path: '/test/1' }, {