-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Former-commit-id: 5072ec87feb8745621004a198310faee62e6281c [formerly 6881bd1e425d95d98ebb2b2ed44175fe9e98d5f2] [formerly 5072ec87feb8745621004a198310faee62e6281c [formerly 6881bd1e425d95d98ebb2b2ed44175fe9e98d5f2] [formerly 5072ec87feb8745621004a198310faee62e6281c [formerly 6881bd1e425d95d98ebb2b2ed44175fe9e98d5f2] [formerly 6881bd1e425d95d98ebb2b2ed44175fe9e98d5f2 [formerly c3846e5 [formerly 3bd4f9d9418df3df44f368bb2ae32652c69c013f]]]]] Former-commit-id: bd93fcb Former-commit-id: 12ad7ae Former-commit-id: 0f4dee0a6517e1f77af70100ba450ae8f988307a [formerly 4d96d09f6d76a67c4fc4386efe6f51c1707f9d99] Former-commit-id: edb1f8cd9ce546d41873b5601fbe390fc7f43521 Former-commit-id: af996ea474ed1ae6d51068dcccbdc3cc29cea56d Former-commit-id: efb029f9cf3e2c9dcff8d48e4c53334d8b353fc7 Former-commit-id: 6f5b77ea91dc0259a6610cc9d3aa77f8e9724fcd Former-commit-id: e83e0ac4a63e9c6f5e7c6ccd66909badea6ae8ef
- Loading branch information
Showing
8 changed files
with
63 additions
and
139 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 0 additions & 27 deletions
27
src/layout/header-aside/components/components/menu-item/index.vue
This file was deleted.
Oops, something went wrong.
39 changes: 0 additions & 39 deletions
39
src/layout/header-aside/components/components/menu-sub/index.vue
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { uniqueId } from 'lodash' | ||
|
||
// 创建 el-menu-item | ||
export function elMenuItem (createElement, menu) { | ||
return createElement('el-menu-item', { props: { index: menu.path || uniqueId('d2-menu-empty-') } }, [ | ||
...menu.icon ? [ | ||
createElement('i', { attrs: { class: `fa fa-${menu.icon}` } }) | ||
] : [], | ||
...menu.icon === undefined & !menu.iconSvg ? [ | ||
createElement('i', { attrs: { class: 'fa fa-file-o' } }) | ||
] : [], | ||
...menu.iconSvg ? [ | ||
createElement('d2-icon-svg', { props: { name: menu.iconSvg } }) | ||
] : [], | ||
createElement('span', { slot: 'title' }, menu.title || this.$t('layout.header-aside.menu-item.label-default')) | ||
]) | ||
} | ||
|
||
// 创建 el-submenu | ||
export function elSubmenu (createElement, menu) { | ||
return createElement('el-submenu', { props: { index: menu.path || uniqueId('d2-menu-empty-') } }, [ | ||
...menu.icon ? [ | ||
createElement('i', { slot: 'title', attrs: { class: `fa fa-${menu.icon}` } }) | ||
] : [], | ||
...menu.icon === undefined & !menu.iconSvg ? [ | ||
createElement('i', { slot: 'title', attrs: { class: 'fa fa-file-o' } }) | ||
] : [], | ||
...menu.iconSvg ? [ | ||
createElement('d2-icon-svg', { slot: 'title', props: { name: menu.iconSvg } }) | ||
] : [], | ||
createElement('span', { slot: 'title' }, menu.title || this.$t('layout.header-aside.menu-item.label-default')), | ||
...menu.children.map((child, childIndex) => (child.children === undefined ? elMenuItem : elSubmenu).call(this, createElement, child)) | ||
]) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
f0390fbbbea8e33d903173bd90f63bbfb8069d25 | ||
53a2534f94e1fbddf5d771247686935e6f70062b |