2021-09-25 08:51:32 +00:00
|
|
|
import type { MenuProps } from './src/Menu';
|
|
|
|
import Menu from './src/Menu';
|
|
|
|
import type { MenuItemProps } from './src/MenuItem';
|
|
|
|
import MenuItem from './src/MenuItem';
|
|
|
|
import type { SubMenuProps } from './src/SubMenu';
|
|
|
|
import SubMenu from './src/SubMenu';
|
|
|
|
import type { MenuItemGroupProps } from './src/ItemGroup';
|
|
|
|
import ItemGroup from './src/ItemGroup';
|
2021-06-07 09:35:03 +00:00
|
|
|
import Divider from './src/Divider';
|
2022-03-26 14:52:54 +00:00
|
|
|
import type { MenuDividerProps } from './src/Divider';
|
2021-06-26 01:35:40 +00:00
|
|
|
import type { App, Plugin } from 'vue';
|
2022-01-03 14:23:24 +00:00
|
|
|
import type { MenuTheme, MenuMode } from './src/interface';
|
2018-09-19 05:21:57 +00:00
|
|
|
/* istanbul ignore next */
|
2021-06-23 15:08:16 +00:00
|
|
|
Menu.install = function (app: App) {
|
2020-06-16 14:55:02 +00:00
|
|
|
app.component(Menu.name, Menu);
|
2021-06-07 09:35:03 +00:00
|
|
|
app.component(MenuItem.name, MenuItem);
|
|
|
|
app.component(SubMenu.name, SubMenu);
|
|
|
|
app.component(Divider.name, Divider);
|
|
|
|
app.component(ItemGroup.name, ItemGroup);
|
2020-10-13 11:14:56 +00:00
|
|
|
return app;
|
2019-01-12 03:33:27 +00:00
|
|
|
};
|
2020-11-01 07:03:33 +00:00
|
|
|
|
2021-06-07 09:35:03 +00:00
|
|
|
Menu.Item = MenuItem;
|
|
|
|
Menu.Divider = Divider;
|
|
|
|
Menu.SubMenu = SubMenu;
|
|
|
|
Menu.ItemGroup = ItemGroup;
|
2022-03-26 14:52:54 +00:00
|
|
|
export type {
|
|
|
|
MenuProps,
|
|
|
|
SubMenuProps,
|
|
|
|
MenuItemProps,
|
|
|
|
MenuItemGroupProps,
|
|
|
|
MenuTheme,
|
|
|
|
MenuMode,
|
|
|
|
MenuDividerProps,
|
|
|
|
};
|
2021-06-07 09:35:03 +00:00
|
|
|
export {
|
|
|
|
SubMenu,
|
|
|
|
MenuItem as Item,
|
|
|
|
MenuItem,
|
|
|
|
ItemGroup,
|
2021-06-23 13:47:53 +00:00
|
|
|
ItemGroup as MenuItemGroup,
|
2021-06-07 09:35:03 +00:00
|
|
|
Divider,
|
2021-06-23 13:47:53 +00:00
|
|
|
Divider as MenuDivider,
|
2021-06-07 09:35:03 +00:00
|
|
|
};
|
|
|
|
|
2020-11-01 07:03:33 +00:00
|
|
|
export default Menu as typeof Menu &
|
|
|
|
Plugin & {
|
2021-06-07 09:35:03 +00:00
|
|
|
readonly Item: typeof MenuItem;
|
2020-11-01 07:03:33 +00:00
|
|
|
readonly SubMenu: typeof SubMenu;
|
|
|
|
readonly Divider: typeof Divider;
|
|
|
|
readonly ItemGroup: typeof ItemGroup;
|
|
|
|
};
|