Skip to content

Commit

Permalink
fix(menu-side): 修复侧边栏菜单自动展开失效
Browse files Browse the repository at this point in the history
fix #258
  • Loading branch information
FairyEver committed Apr 19, 2020
1 parent 0ed6922 commit 72cc381
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/layout/header-aside/components/libs/util.menu.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// 创建 el-menu-item
export function elMenuItem (createElement, menu) {
return createElement('el-menu-item', { props: { index: menu.path } }, [
return createElement('el-menu-item', { key: menu.path, props: { index: menu.path } }, [
...menu.icon ? [
createElement('i', { attrs: { class: `fa fa-${menu.icon}` } })
] : [],
Expand All @@ -16,7 +16,7 @@ export function elMenuItem (createElement, menu) {

// 创建 el-submenu
export function elSubmenu (createElement, menu) {
return createElement('el-submenu', { props: { index: menu.path } }, [
return createElement('el-submenu', { key: menu.path, props: { index: menu.path } }, [
...menu.icon ? [
createElement('i', { slot: 'title', attrs: { class: `fa fa-${menu.icon}` } })
] : [],
Expand Down

0 comments on commit 72cc381

Please sign in to comment.