hongluan-ui
Version:
Hongluan Component Library for Vue 3
175 lines (174 loc) • 5.36 kB
TypeScript
import type { PropType } from 'vue';
import type { CascaderNode, CascaderValue } from 'hongluan-ui/es/components/cascader-panel';
import type { Placement } from 'hongluan-ui/es/components/popper';
export declare const cascaderProps: {
emptyValues: ArrayConstructor;
valueOnClear: {
readonly type: PropType<import("hongluan-ui/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor, BooleanConstructor, FunctionConstructor], unknown, unknown>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
/**
* @description size of input
*/
size: {
type: PropType<"xxxs" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl">;
validator: (val: string) => boolean;
};
/**
* @description placeholder of input
*/
placeholder: StringConstructor;
/**
* @description whether Cascader is disabled
*/
disabled: BooleanConstructor;
/**
* @description whether selected value can be cleared
*/
clearable: BooleanConstructor;
/**
* @description whether the options can be searched
*/
filterable: BooleanConstructor;
/**
* @description customize search logic, the first parameter is `node`, the second is `keyword`, and need return a boolean value indicating whether it hits.
*/
filterMethod: {
type: PropType<(node: CascaderNode, keyword: string) => boolean>;
default: (node: CascaderNode, keyword: string) => boolean;
};
/**
* @description option label separator
*/
separator: {
type: StringConstructor;
default: string;
};
/**
* @description whether to display all levels of the selected value in the input
*/
showAllLevels: {
type: BooleanConstructor;
default: boolean;
};
/**
* @description whether to collapse tags in multiple selection mode
*/
collapseTags: BooleanConstructor;
/**
* @description The max tags number to be shown. To use this, collapse-tags must be true
*/
maxCollapseTags: {
type: NumberConstructor;
default: number;
};
/**
* @description native input id
*/
collapseTagsTooltip: {
type: BooleanConstructor;
default: boolean;
};
/**
* @description debounce delay when typing filter keyword, in milliseconds
*/
debounce: {
type: NumberConstructor;
default: number;
};
/**
* @description hook function before filtering with the value to be filtered as its parameter. If `false` is returned or a `Promise` is returned and then is rejected, filtering will be aborted
*/
beforeFilter: {
type: PropType<(value: string) => boolean | Promise<any>>;
default: () => boolean;
};
/**
* @description position of dropdown
*/
placement: {
type: PropType<Placement>;
default: string;
};
/**
* @description list of possible positions for dropdown
*/
fallbackPlacements: {
type: PropType<Placement[]>;
default: string[];
};
/**
* @description custom class name for Cascader's dropdown
*/
popperClass: {
type: StringConstructor;
default: string;
};
block: {
type: BooleanConstructor;
default: boolean;
};
popperAppendToBody: {
type: BooleanConstructor;
default: any;
};
/**
* @description whether cascader popup is teleported
*/
teleported: import("hongluan-ui/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
fill: BooleanConstructor;
popperOffset: {
type: NumberConstructor;
default: number;
};
/**
* @description tag type
*/
tagType: {
type: StringConstructor;
default: string;
};
/**
* @description tag effect
*/
tagEffect: {
type: StringConstructor;
default: string;
};
/**
* @description whether to trigger form validation
*/
validateEvent: {
type: BooleanConstructor;
default: boolean;
};
/**
* @description when dropdown is inactive and `persistent` is `false`, dropdown will be destroyed
*/
persistent: {
type: BooleanConstructor;
default: boolean;
};
modelValue: PropType<CascaderValue>;
options: {
type: PropType<import("hongluan-ui/es/components/cascader-panel").CascaderOption[]>;
default: () => import("hongluan-ui/es/components/cascader-panel").CascaderOption[];
};
props: {
type: PropType<import("hongluan-ui/es/components/cascader-panel").CascaderProps>;
default: () => import("hongluan-ui/es/components/cascader-panel").CascaderProps;
};
};
export declare const cascaderEmits: {
"update:modelValue": (_: CascaderValue) => boolean;
change: (_: CascaderValue) => boolean;
focus: (evt: FocusEvent) => boolean;
blur: (evt: FocusEvent) => boolean;
clear: () => boolean;
visibleChange: (val: boolean) => boolean;
expandChange: (val: CascaderValue) => boolean;
removeTag: (val: CascaderNode['valueByOption']) => boolean;
};
export declare type CascaderEmits = typeof cascaderEmits;