mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
refactor(utils): refactor menu-bar (#3343)
This commit is contained in:
@@ -8,11 +8,12 @@ class Menu {
|
||||
}
|
||||
init(): void {
|
||||
const menuChildren = this.domNode.childNodes
|
||||
;[].filter
|
||||
.call(menuChildren, (child: Node) => child.nodeType === 1)
|
||||
.forEach((child: Node) => {
|
||||
Array.from(menuChildren, (child: Node) => {
|
||||
if (child.nodeType === 1) {
|
||||
new MenuItem(child as HTMLElement)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export default Menu
|
||||
|
||||
Reference in New Issue
Block a user