ivue-material-plus
Version:
A high quality UI components Library with Vue.js
98 lines (97 loc) • 2.69 kB
TypeScript
import { Props } from './types/menu';
declare const _sfc_main: {
name: string;
emits: string[];
props: {
/**
* 主题,可选值为 light、dark、primary,其中 primary 只适用于 mode="horizontal"
*
* @type {String}
*/
theme: {
type: StringConstructor;
validator(value: string): boolean;
default: string;
};
/**
* 菜单类型,可选值为 horizontal(水平) 和 vertical(垂直)
*
* @type {String}
*/
mode: {
type: StringConstructor;
validator(value: string): boolean;
default: string;
};
/**
* 垂直宽度
*
* @type {String}
*/
width: {
type: StringConstructor;
default: string;
};
/**
* 展开的 Submenu 的 name 集合
*
* @type {Array}
*/
openNames: {
type: ArrayConstructor;
default: () => any[];
};
/**
* 激活菜单的 name 值
*
* @type {String | Number}
*/
activeName: {
type: (NumberConstructor | StringConstructor)[];
};
/**
* 是否开启手风琴模式,开启后每次至多展开一个子菜单
*
* @type {Boolean}
*/
accordion: {
type: BooleanConstructor;
default: boolean;
};
};
setup(props: Props, { emit }: {
emit: any;
}): {
prefixCls: string;
data: {
openedNames: any[];
menuItemList: {
uid: number;
activeName: (name: string | number) => void;
}[];
submenuList: {
uid: number;
submenu: {
data: {
opened: boolean;
active: string | number | boolean;
};
name: number;
activeName: (status: string | number | boolean) => void;
};
}[];
currentActiveName: string | number;
ready: boolean;
};
wrapperClasses: import("vue").ComputedRef<(string | {
[x: string]: string;
})[]>;
wrapperStyles: import("vue").ComputedRef<{
width?: string;
}>;
updateOpenKeys: (name: any) => void;
updateOpened: (openedNames?: any[]) => void;
updateActiveName: (activeName?: string | number) => void;
};
};
export default _sfc_main;