UNPKG

@scvzerng/vue2-context-menu

Version:
291 lines (289 loc) 7.22 kB
import { PropType, SVGAttributes } from 'vue'; declare const _default: import('vue').DefineComponent<{ /** * Is this menu disabled? */ disabled: { type: BooleanConstructor; default: boolean; }; /** * Is this menu hidden? */ hidden: { type: BooleanConstructor; default: boolean; }; /** * Is this menu disabled? */ clickHandler: { type: PropType<() => void>; default: null; }; /** * Menu label */ label: { type: StringConstructor; default: string; }; /** * Menu icon (for icon class) */ icon: { type: StringConstructor; default: string; }; /** * Custom icon library font class name. * * Only for css font icon, If you use the svg icon, you do not need to use this. */ iconFontClass: { type: StringConstructor; default: string; }; /** * Is this menu item checked? * * The check mark are displayed on the left side of the icon, so it is not recommended to display the icon at the same time. */ checked: { type: BooleanConstructor; default: boolean; }; /** * Shortcut key text display on the right. * * The shortcut keys here are only for display. You need to handle the key events by yourself. */ shortcut: { type: StringConstructor; default: string; }; /** * Display icons use svg symbol (`<use xlink:href="#icon-symbol-name">`) , only valid when icon attribute is empty. */ svgIcon: { type: StringConstructor; default: string; }; /** * The user-defined attribute of the svg tag, which is valid when using `svgIcon`. */ svgProps: { type: PropType<SVGAttributes>; default: null; }; /** * Should a fixed-width icon area be reserved for menu items without icon. (this item) * * Default is true . * * The width of icon area can be override with css var `--mx-menu-placeholder-width`. */ preserveIconWidth: { type: BooleanConstructor; default: boolean; }; /** * Show right arrow on this menu? */ showRightArrow: { type: BooleanConstructor; default: boolean; }; /** * Should close menu when Click this menu item ? */ clickClose: { type: BooleanConstructor; default: boolean; }; /** * By default, the submenu will automatically adjust its position to prevent it overflow the container. * * If you allow menu overflow containers, you can set this to false. * * Default is inherit from `MenuOptions.adjustPosition` . */ adjustSubMenuPosition: { type: BooleanConstructor; default: undefined; }; /** * Max height of submenu */ maxHeight: { type: (StringConstructor | NumberConstructor)[]; default: number; }; /** * Max width of submenu */ maxWidth: { type: (StringConstructor | NumberConstructor)[]; default: number; }; /** * Min width of submenu */ minWidth: { type: (StringConstructor | NumberConstructor)[]; default: number; }; }, () => import('vue').VNode, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, Readonly<import('vue').ExtractPropTypes<{ /** * Is this menu disabled? */ disabled: { type: BooleanConstructor; default: boolean; }; /** * Is this menu hidden? */ hidden: { type: BooleanConstructor; default: boolean; }; /** * Is this menu disabled? */ clickHandler: { type: PropType<() => void>; default: null; }; /** * Menu label */ label: { type: StringConstructor; default: string; }; /** * Menu icon (for icon class) */ icon: { type: StringConstructor; default: string; }; /** * Custom icon library font class name. * * Only for css font icon, If you use the svg icon, you do not need to use this. */ iconFontClass: { type: StringConstructor; default: string; }; /** * Is this menu item checked? * * The check mark are displayed on the left side of the icon, so it is not recommended to display the icon at the same time. */ checked: { type: BooleanConstructor; default: boolean; }; /** * Shortcut key text display on the right. * * The shortcut keys here are only for display. You need to handle the key events by yourself. */ shortcut: { type: StringConstructor; default: string; }; /** * Display icons use svg symbol (`<use xlink:href="#icon-symbol-name">`) , only valid when icon attribute is empty. */ svgIcon: { type: StringConstructor; default: string; }; /** * The user-defined attribute of the svg tag, which is valid when using `svgIcon`. */ svgProps: { type: PropType<SVGAttributes>; default: null; }; /** * Should a fixed-width icon area be reserved for menu items without icon. (this item) * * Default is true . * * The width of icon area can be override with css var `--mx-menu-placeholder-width`. */ preserveIconWidth: { type: BooleanConstructor; default: boolean; }; /** * Show right arrow on this menu? */ showRightArrow: { type: BooleanConstructor; default: boolean; }; /** * Should close menu when Click this menu item ? */ clickClose: { type: BooleanConstructor; default: boolean; }; /** * By default, the submenu will automatically adjust its position to prevent it overflow the container. * * If you allow menu overflow containers, you can set this to false. * * Default is inherit from `MenuOptions.adjustPosition` . */ adjustSubMenuPosition: { type: BooleanConstructor; default: undefined; }; /** * Max height of submenu */ maxHeight: { type: (StringConstructor | NumberConstructor)[]; default: number; }; /** * Max width of submenu */ maxWidth: { type: (StringConstructor | NumberConstructor)[]; default: number; }; /** * Min width of submenu */ minWidth: { type: (StringConstructor | NumberConstructor)[]; default: number; }; }>>, { label: string; icon: string; iconFontClass: string; preserveIconWidth: boolean; svgIcon: string; svgProps: SVGAttributes; disabled: boolean; hidden: boolean; checked: boolean; shortcut: string; adjustSubMenuPosition: boolean; clickClose: boolean; maxHeight: string | number; maxWidth: string | number; minWidth: string | number; clickHandler: () => void; showRightArrow: boolean; }>; export default _default;