2021-05-24 03:51:32 +00:00
|
|
|
import Menu, { MenuProps } from './src/Menu';
|
|
|
|
import MenuItem, { MenuItemProps } from './src/MenuItem';
|
|
|
|
import SubMenu, { SubMenuProps } from './src/SubMenu';
|
|
|
|
import ItemGroup, { MenuItemGroupProps } from './src/ItemGroup';
|
2021-05-23 13:49:35 +00:00
|
|
|
import Divider from './src/Divider';
|
|
|
|
import { App } from 'vue';
|
2018-09-19 05:21:57 +00:00
|
|
|
/* istanbul ignore next */
|
2020-10-24 14:38:25 +00:00
|
|
|
Menu.install = function(app: App) {
|
2020-06-16 14:55:02 +00:00
|
|
|
app.component(Menu.name, Menu);
|
2021-05-23 13:49:35 +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-05-23 14:40:42 +00:00
|
|
|
Menu.Item = MenuItem;
|
|
|
|
Menu.Divider = Divider;
|
|
|
|
Menu.SubMenu = SubMenu;
|
|
|
|
Menu.ItemGroup = ItemGroup;
|
|
|
|
|
2021-05-24 03:51:32 +00:00
|
|
|
export {
|
|
|
|
SubMenu,
|
|
|
|
MenuItem as Item,
|
|
|
|
MenuItem,
|
|
|
|
ItemGroup,
|
|
|
|
Divider,
|
|
|
|
MenuProps,
|
|
|
|
SubMenuProps,
|
|
|
|
MenuItemProps,
|
|
|
|
MenuItemGroupProps,
|
|
|
|
};
|
|
|
|
|
2020-11-01 07:03:33 +00:00
|
|
|
export default Menu as typeof Menu &
|
|
|
|
Plugin & {
|
2021-05-23 13:49:35 +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;
|
|
|
|
};
|