tdesign-vue
Version:
170 lines (169 loc) • 7.28 kB
TypeScript
import { CreateElement } from 'vue';
import { ScopedSlotReturnValue } from 'vue/types/vnode';
import { DropdownOption } from './type';
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
dropdownClass: import("@vue/composition-api").ComputedRef<string>;
dropdownMenuClass: import("@vue/composition-api").ComputedRef<string>;
handleItemClick: (optionItem: {
disabled: boolean;
children: unknown;
}, options: {
data: DropdownOption;
context: {
e: MouseEvent;
};
}) => void;
menuRef: import("@vue/composition-api").Ref<HTMLElement>;
isOverMaxHeight: import("@vue/composition-api").Ref<boolean>;
handleScroll: (e: MouseEvent, deep: number) => void;
scrollTopMap: {};
}> & import("@vue/composition-api").Data, {
renderOptionContent(content: string | ((h: CreateElement) => ScopedSlotReturnValue)): ScopedSlotReturnValue;
renderOptions(data: Array<DropdownOption>, deep: number): unknown[];
}, {}, {
direction: {
type: import("vue").PropType<"left" | "right">;
default: "left" | "right";
validator(val: "left" | "right"): boolean;
};
disabled: BooleanConstructor;
hideAfterItemClick: {
type: BooleanConstructor;
default: boolean;
};
maxColumnWidth: {
type: import("vue").PropType<string | number>;
default: number;
};
maxHeight: {
type: NumberConstructor;
default: number;
};
minColumnWidth: {
type: import("vue").PropType<string | number>;
default: number;
};
options: {
type: import("vue").PropType<DropdownOption[]>;
default: () => DropdownOption[];
};
placement: {
type: import("vue").PropType<"left" | "top" | "bottom" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "left-top" | "left-bottom" | "right-top" | "right-bottom">;
default: "left" | "top" | "bottom" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "left-top" | "left-bottom" | "right-top" | "right-bottom";
validator(val: "left" | "top" | "bottom" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "left-top" | "left-bottom" | "right-top" | "right-bottom"): boolean;
};
popupProps: {
type: import("vue").PropType<import("..").TdPopupProps>;
};
trigger: {
type: import("vue").PropType<"click" | "focus" | "hover" | "context-menu">;
default: "click" | "focus" | "hover" | "context-menu";
validator(val: "click" | "focus" | "hover" | "context-menu"): boolean;
};
onClick: import("vue").PropType<(dropdownItem: DropdownOption, context: {
e: MouseEvent;
}) => void>;
}, import("@vue/composition-api").ExtractPropTypes<{
direction: {
type: import("vue").PropType<"left" | "right">;
default: "left" | "right";
validator(val: "left" | "right"): boolean;
};
disabled: BooleanConstructor;
hideAfterItemClick: {
type: BooleanConstructor;
default: boolean;
};
maxColumnWidth: {
type: import("vue").PropType<string | number>;
default: number;
};
maxHeight: {
type: NumberConstructor;
default: number;
};
minColumnWidth: {
type: import("vue").PropType<string | number>;
default: number;
};
options: {
type: import("vue").PropType<DropdownOption[]>;
default: () => DropdownOption[];
};
placement: {
type: import("vue").PropType<"left" | "top" | "bottom" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "left-top" | "left-bottom" | "right-top" | "right-bottom">;
default: "left" | "top" | "bottom" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "left-top" | "left-bottom" | "right-top" | "right-bottom";
validator(val: "left" | "top" | "bottom" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "left-top" | "left-bottom" | "right-top" | "right-bottom"): boolean;
};
popupProps: {
type: import("vue").PropType<import("..").TdPopupProps>;
};
trigger: {
type: import("vue").PropType<"click" | "focus" | "hover" | "context-menu">;
default: "click" | "focus" | "hover" | "context-menu";
validator(val: "click" | "focus" | "hover" | "context-menu"): boolean;
};
onClick: import("vue").PropType<(dropdownItem: DropdownOption, context: {
e: MouseEvent;
}) => void>;
}>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
direction: "left" | "right";
maxHeight: number;
disabled: boolean;
options: DropdownOption[];
trigger: "click" | "focus" | "hover" | "context-menu";
placement: "left" | "top" | "bottom" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "left-top" | "left-bottom" | "right-top" | "right-bottom";
maxColumnWidth: string | number;
minColumnWidth: string | number;
hideAfterItemClick: boolean;
} & {
onClick?: (dropdownItem: DropdownOption, context: {
e: MouseEvent;
}) => void;
popupProps?: unknown;
}, import("@vue/composition-api").ShallowUnwrapRef<{
dropdownClass: import("@vue/composition-api").ComputedRef<string>;
dropdownMenuClass: import("@vue/composition-api").ComputedRef<string>;
handleItemClick: (optionItem: {
disabled: boolean;
children: unknown;
}, options: {
data: DropdownOption;
context: {
e: MouseEvent;
};
}) => void;
menuRef: import("@vue/composition-api").Ref<HTMLElement>;
isOverMaxHeight: import("@vue/composition-api").Ref<boolean>;
handleScroll: (e: MouseEvent, deep: number) => void;
scrollTopMap: {};
}>, import("@vue/composition-api").Data, {}, {
renderOptionContent(content: string | ((h: CreateElement) => ScopedSlotReturnValue)): ScopedSlotReturnValue;
renderOptions(data: Array<DropdownOption>, deep: number): unknown[];
}, {}, {}, {}, {
direction: "left" | "right";
maxHeight: number;
disabled: boolean;
options: DropdownOption[];
trigger: "click" | "focus" | "hover" | "context-menu";
placement: "left" | "top" | "bottom" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "left-top" | "left-bottom" | "right-top" | "right-bottom";
maxColumnWidth: string | number;
minColumnWidth: string | number;
hideAfterItemClick: boolean;
} & {
onClick?: (dropdownItem: DropdownOption, context: {
e: MouseEvent;
}) => void;
popupProps?: unknown;
}, {
direction: "left" | "right";
maxHeight: number;
disabled: boolean;
options: DropdownOption[];
trigger: "click" | "focus" | "hover" | "context-menu";
placement: "left" | "top" | "bottom" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "left-top" | "left-bottom" | "right-top" | "right-bottom";
maxColumnWidth: string | number;
minColumnWidth: string | number;
hideAfterItemClick: boolean;
}, true>);
export default _default;