import { CSSProperties, VNode } from 'vue'; import { ScrollbarProps } from '../scrollbar'; import { MountElement } from '../utils'; export interface Option { label?: string; value?: string | number; disabled?: boolean; children?: Option[]; isLeaf?: boolean; loading?: boolean; [propName: string]: any; } export interface FieldNames { label?: string; value?: string; children?: string; } export type CascaderValue = string | number; export type CascaderPath = CascaderValue[]; export type CascaderModelValue = CascaderPath | CascaderPath[]; export type CascaderPlacement = 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topRight'; export type ShowCheckedStrategy = typeof SHOW_PARENT | typeof SHOW_CHILD; export interface SearchSegment { text: string; hit: boolean; } export interface SearchRenderParams { inputValue: string; path: Option[]; segments: SearchSegment[][]; disabled: boolean; } export interface SearchConfig { filter?: (inputValue: string, path: Option[]) => boolean; sort?: (pathA: Option[], pathB: Option[], inputValue: string) => number; render?: (params: SearchRenderParams) => VNode | string; limit?: number | false; matchInputWidth?: boolean; } export interface DisplayRenderParams { labels: string[]; selectedOptions: Option[]; } export interface TagRenderParams { label: string; value: CascaderPath; path: Option[]; closable: boolean; disabled: boolean; onClose: (e?: MouseEvent) => void; } export interface MaxTagPlaceholderParams { omittedValues: CascaderPath[]; omittedLabels: string[]; } export interface Props { value?: CascaderModelValue; defaultValue?: CascaderModelValue; open?: boolean; searchValue?: string; options?: Option[]; fieldNames?: FieldNames; width?: string | number; size?: 'small' | 'middle' | 'large'; placeholder?: string; bordered?: boolean; maxTagCount?: number | 'responsive'; maxTagPlaceholder?: string | VNode | ((params: MaxTagPlaceholderParams) => VNode); disabled?: boolean; status?: 'error' | 'warning'; allowClear?: boolean; clearIcon?: string | VNode | (() => VNode); suffixIcon?: string | VNode | (() => VNode); expandIcon?: string | VNode | (() => VNode); loadingIcon?: string | VNode | (() => VNode); removeIcon?: string | VNode | (() => VNode); changeOnSelect?: boolean; multiple?: boolean; showCheckedStrategy?: ShowCheckedStrategy; loadData?: (selectedOptions: Option[]) => void; expandTrigger?: 'click' | 'hover'; showSearch?: boolean | SearchConfig; displayRender?: (params: DisplayRenderParams) => VNode | string; tagRender?: (params: TagRenderParams) => VNode; notFoundContent?: string | VNode | null; panelHeight?: number; virtual?: boolean; optionHeight?: number; scrollbarProps?: ScrollbarProps; placement?: CascaderPlacement; flip?: boolean; to?: string | MountElement | false | ((triggerNode: HTMLElement | null) => string | MountElement); popupClassName?: string; dropdownMenuStyle?: CSSProperties; dropdownMenuColumnStyle?: CSSProperties; zIndex?: number; autofocus?: boolean; id?: string; } export interface CascaderSlots { default?: () => VNode[]; option?: (option: Option) => VNode[]; expandIcon?: () => VNode[]; loadingIcon?: () => VNode[]; suffixIcon?: () => VNode[]; clearIcon?: (props: { clear: (e?: MouseEvent) => void; }) => VNode[]; removeIcon?: () => VNode[]; notFoundContent?: () => VNode[]; displayRender?: (params: DisplayRenderParams) => VNode[]; tagRender?: (params: TagRenderParams) => VNode[]; maxTagPlaceholder?: (params: MaxTagPlaceholderParams) => VNode[]; showSearchRender?: (params: SearchRenderParams) => VNode[]; action?: () => VNode[]; } export declare const SHOW_PARENT = "SHOW_PARENT"; export declare const SHOW_CHILD = "SHOW_CHILD"; declare const _default: __VLS_WithTemplateSlots void; blur: () => void | undefined; getCheckedData: () => Option[][]; }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, { search: (...args: any[]) => void; focus: (...args: any[]) => void; blur: (...args: any[]) => void; change: (...args: any[]) => void; clear: (...args: any[]) => void; "update:value": (...args: any[]) => void; openChange: (...args: any[]) => void; dropdownVisibleChange: (...args: any[]) => void; "update:open": (...args: any[]) => void; "update:searchValue": (...args: any[]) => void; }, string, import('vue').PublicProps, Readonly & Readonly<{ onSearch?: ((...args: any[]) => any) | undefined; onFocus?: ((...args: any[]) => any) | undefined; onBlur?: ((...args: any[]) => any) | undefined; onChange?: ((...args: any[]) => any) | undefined; onClear?: ((...args: any[]) => any) | undefined; "onUpdate:value"?: ((...args: any[]) => any) | undefined; onOpenChange?: ((...args: any[]) => any) | undefined; onDropdownVisibleChange?: ((...args: any[]) => any) | undefined; "onUpdate:open"?: ((...args: any[]) => any) | undefined; "onUpdate:searchValue"?: ((...args: any[]) => any) | undefined; }>, { size: "small" | "middle" | "large"; value: CascaderModelValue; width: string | number; placement: CascaderPlacement; flip: boolean; bordered: boolean; placeholder: string; to: string | MountElement | false | ((triggerNode: HTMLElement | null) => string | MountElement); zIndex: number; open: boolean; multiple: boolean; disabled: boolean; allowClear: boolean; autofocus: boolean; popupClassName: string; dropdownMenuStyle: CSSProperties; options: Option[]; status: "error" | "warning"; clearIcon: string | VNode | (() => VNode); id: string; defaultValue: CascaderModelValue; searchValue: string; fieldNames: FieldNames; suffixIcon: string | VNode | (() => VNode); showSearch: boolean | SearchConfig; maxTagCount: number | "responsive"; maxTagPlaceholder: string | VNode | ((params: MaxTagPlaceholderParams) => VNode); tagRender: (params: TagRenderParams) => VNode; removeIcon: string | VNode | (() => VNode); notFoundContent: string | VNode | null; virtual: boolean; scrollbarProps: ScrollbarProps; expandIcon: string | VNode | (() => VNode); loadingIcon: string | VNode | (() => VNode); changeOnSelect: boolean; showCheckedStrategy: ShowCheckedStrategy; loadData: (selectedOptions: Option[]) => void; expandTrigger: "click" | "hover"; displayRender: (params: DisplayRenderParams) => VNode | string; panelHeight: number; optionHeight: number; dropdownMenuColumnStyle: CSSProperties; }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, any, any>, any>; export default _default; type __VLS_WithTemplateSlots = T & { new (): { $slots: S; }; };