element-plus
Version:
A Component Library for Vue 3
141 lines (140 loc) • 5.57 kB
TypeScript
import type { ComputedRef, StyleValue } from 'vue';
import type { CascaderNode, CascaderPanelInstance, CascaderValue } from 'element-plus/es/components/cascader-panel';
import type { CascaderComponentProps } from './cascader';
declare const __VLS_base: import("vue").DefineComponent<__VLS_WithDefaultsLocal<__VLS_TypePropsToOption<CascaderComponentProps>, {
options: () => never[];
props: () => {};
disabled: undefined;
clearIcon: any;
filterMethod: (node: any, keyword: any) => any;
separator: string;
showAllLevels: boolean;
maxCollapseTags: number;
debounce: number;
beforeFilter: () => boolean;
placement: string;
fallbackPlacements: () => string[];
teleported: boolean;
effect: string;
tagType: string;
tagEffect: string;
validateEvent: boolean;
persistent: boolean;
showCheckedStrategy: string;
showPrefix: boolean;
popperStyle: undefined;
valueOnClear: undefined;
}>, {
/**
* @description get an array of currently selected node,(leafOnly) whether only return the leaf checked nodes, default is `false`
*/
getCheckedNodes: (leafOnly: boolean) => CascaderNode[] | undefined;
/**
* @description cascader panel ref
*/
cascaderPanelRef: import("vue").Ref<CascaderPanelInstance | undefined>;
/**
* @description toggle the visible of popper
*/
togglePopperVisible: (visible?: boolean) => void;
/**
* @description cascader content ref
*/
contentRef: ComputedRef<HTMLElement | undefined>;
/**
* @description selected content text
*/
presentText: ComputedRef<string>;
/** @description focus the input element */
focus: () => void;
/** @description blur the input element */
blur: () => void;
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
focus: (evt: FocusEvent) => void;
"update:modelValue": (value: CascaderValue | null | undefined) => void;
change: (value: CascaderValue | null | undefined) => void;
clear: () => void;
blur: (evt: FocusEvent) => void;
visibleChange: (val: boolean) => void;
expandChange: (val: CascaderValue) => void;
removeTag: (val: import("element-plus/es/components/cascader-panel").CascaderNodeValue | import("element-plus/es/components/cascader-panel").CascaderNodePathValue) => void;
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaultsLocal<__VLS_TypePropsToOption<CascaderComponentProps>, {
options: () => never[];
props: () => {};
disabled: undefined;
clearIcon: any;
filterMethod: (node: any, keyword: any) => any;
separator: string;
showAllLevels: boolean;
maxCollapseTags: number;
debounce: number;
beforeFilter: () => boolean;
placement: string;
fallbackPlacements: () => string[];
teleported: boolean;
effect: string;
tagType: string;
tagEffect: string;
validateEvent: boolean;
persistent: boolean;
showCheckedStrategy: string;
showPrefix: boolean;
popperStyle: undefined;
valueOnClear: undefined;
}>>> & {
"onUpdate:modelValue"?: ((value: CascaderValue | null | undefined) => any) | undefined;
onFocus?: ((evt: FocusEvent) => any) | undefined;
onChange?: ((value: CascaderValue | null | undefined) => any) | undefined;
onBlur?: ((evt: FocusEvent) => any) | undefined;
onClear?: (() => any) | undefined;
onVisibleChange?: ((val: boolean) => any) | undefined;
onExpandChange?: ((val: CascaderValue) => any) | undefined;
onRemoveTag?: ((val: import("element-plus/es/components/cascader-panel").CascaderNodeValue | import("element-plus/es/components/cascader-panel").CascaderNodePathValue) => any) | undefined;
}, {
disabled: boolean;
separator: string;
props: import("element-plus/es/components/cascader-panel").CascaderProps;
placement: import("element-plus/es/components/popper").Placement;
options: import("element-plus/es/components/cascader-panel").CascaderOption[];
effect: import("element-plus/es/components/popper").PopperEffect;
valueOnClear: string | number | boolean | Function | null;
teleported: boolean;
clearIcon: string | import("vue").Component;
validateEvent: boolean;
fallbackPlacements: import("element-plus/es/components/popper").Placement[];
popperStyle: string | false | import("vue").CSSProperties | StyleValue[] | null;
persistent: boolean;
debounce: number;
maxCollapseTags: number;
filterMethod: (node: CascaderNode, keyword: string) => boolean;
tagType: "primary" | "success" | "warning" | "info" | "danger";
tagEffect: "dark" | "light" | "plain";
showPrefix: boolean;
showAllLevels: boolean;
beforeFilter: (value: string) => boolean | Promise<any>;
showCheckedStrategy: "parent" | "child";
}, {}>;
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
declare const _default: typeof __VLS_export;
export default _default;
type __VLS_TypePropsToOption<T> = {
[K in keyof T]-?: {} extends Pick<T, K> ? {
type: import('vue').PropType<Required<T>[K]>;
} : {
type: import('vue').PropType<T[K]>;
required: true;
};
};
type __VLS_WithDefaultsLocal<P, D> = {
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
default: D[K];
}> : P[K];
};
type __VLS_WithSlots<T, S> = T & {
new (): {
$slots: S;
};
};
type __VLS_PrettifyLocal<T> = {
[K in keyof T as K]: T[K];
} & {};