element-plus/packages/components/menu/index.ts
kooriookami b5c7914a05
feat(menu): add ellipsis in horizontal mode (#3083)
* feat(components): adjust types

* feat: popper add fallbackPlacements

* feat: update

* feat: update

* feat: update

* feat: update

* feat: u7pdate

* feat: update fallbackPlacements

* feat: update fallbackPlacements

* feat: when calculate, include padding

* feat: remove horizontal first level arrow

* feat: update

* feat: fix click item index mistake

* feat: fix item active

* feat: update

* feat: remove ele.me website
2021-08-31 15:31:48 +08:00

34 lines
905 B
TypeScript

import Menu from './src/menu.vue'
import MenuItem from './src/menuItem.vue'
import MenuItemGroup from './src/menuItemGroup.vue'
import SubMenu from './src/submenu.vue'
import type { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils/types'
Menu.install = (app: App): void => {
app.component(Menu.name, Menu)
app.component(MenuItem.name, MenuItem)
app.component(MenuItemGroup.name, MenuItemGroup)
app.component(SubMenu.name, SubMenu)
}
Menu.MenuItem = MenuItem
Menu.MenuItemGroup = MenuItemGroup
Menu.SubMenu = SubMenu
const _Menu = Menu as any as SFCWithInstall<typeof Menu> & {
MenuItem: typeof MenuItem
MenuItemGroup: typeof MenuItemGroup
SubMenu: typeof SubMenu
}
export default _Menu
export const ElMenu = _Menu
export const ElMenuItem = MenuItem
export const ElMenuItemGroup = MenuItemGroup
export const ElSubMenu = SubMenu
export * from './src/menu.type'