@fesjs/fes-design
Version:
fes-design for PC
64 lines (63 loc) • 2.15 kB
TypeScript
import type { ExtractPublicPropTypes, PropType, VNodeTypes } from 'vue';
export type DropdownValue = string | number;
export interface DropdownOption {
value: DropdownValue;
label: string | number | ((option: DropdownOption) => VNodeTypes);
disabled?: boolean;
icon?: () => VNodeTypes;
[key: string]: string | number | boolean | ((option: DropdownOption) => VNodeTypes) | undefined;
}
export declare const dropdownProps: {
readonly modelValue: {
readonly type: PropType<DropdownValue>;
};
readonly visible: {
readonly type: BooleanConstructor;
readonly default: false;
};
readonly appendToContainer: {
readonly type: BooleanConstructor;
readonly default: true;
};
readonly getContainer: {
readonly type: FunctionConstructor;
};
readonly trigger: {
readonly type: PropType<"click" | "hover" | "contextmenu" | "focus">;
readonly default: "hover";
};
readonly placement: {
readonly type: PropType<"left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end">;
readonly default: "bottom";
};
readonly offset: {
readonly type: NumberConstructor;
readonly default: 6;
};
readonly options: {
readonly type: PropType<DropdownOption[]>;
readonly default: () => DropdownOption[];
};
readonly disabled: {
readonly type: BooleanConstructor;
readonly default: false;
};
readonly valueField: {
readonly type: StringConstructor;
readonly default: "value";
};
readonly labelField: {
readonly type: StringConstructor;
readonly default: "label";
};
readonly arrow: {
readonly type: BooleanConstructor;
readonly default: false;
};
readonly showSelectedOption: {
readonly type: BooleanConstructor;
readonly default: false;
};
readonly popperClass: PropType<string | object | []>;
};
export type DropdownProps = ExtractPublicPropTypes<typeof dropdownProps>;