Skip to content

Commit

Permalink
fix: 修复 layout 插件侧边栏高亮问题 (#50)
Browse files Browse the repository at this point in the history
Co-authored-by: 依鹭 <jingcao.cjc@antfin.com>
  • Loading branch information
Ariel-Cheng and 依鹭 authored Mar 23, 2020
1 parent 40ff050 commit ca3882f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/plugin-layout/src/utils/getMenuFromRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function formatter(
}

result.children = children;
delete result.path;
// delete result.path;
}
return result;
}),
Expand Down
1 change: 1 addition & 0 deletions packages/plugin-layout/test/routes/normal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ const normalMenu = [
{ name: '欢迎', path: '/welcome', icon: 'testicon' },
{
name: '菜单示例',
path: '/test',
children: [
{ name: '示例 1', path: '/test/1' },
{
Expand Down
1 change: 1 addition & 0 deletions packages/plugin-layout/test/routes/prefix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const prefixMenu = [
{ name: '欢迎', path: '#/$name/welcome', icon: 'testicon' },
{
name: '菜单示例',
path: '#/$name/test',
children: [
{ name: '示例 1', path: '#/$name/test/1' },
{
Expand Down
1 change: 1 addition & 0 deletions packages/plugin-layout/test/routes/simple.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const simpleMenu = [
{ name: '欢迎', path: '/welcome', icon: 'testicon' },
{
name: '菜单示例',
path: '/test',
children: [
{ name: '示例 1', path: '/test/1' },
{
Expand Down

0 comments on commit ca3882f

Please sign in to comment.