import { Ref } from 'vue'; import { CascaderValue, CustomKeys, ICascaderOption } from '@xuanmo/dl-common'; type SearchResultType = Array<{ id: ICascaderOption['value']; displayName: string; path: ICascaderOption[]; disabled?: boolean; }>; export declare class CascaderStore { optionMap: Map; activePath: Ref; activeTab: Ref; loadingCollect: Ref>; value: CascaderValue; keys: CustomKeys; searchKeywords: Ref; readonly temporaryPrefix = "__temporary__"; private originalOptions; temporaryCount: number; constructor(value: CascaderValue, cascaderOptions: ICascaderOption[], options: { keys: CustomKeys; }); get labelKey(): "label"; get valueKey(): "value"; get childrenKey(): "children"; /** * 当前选中的面板选项列表 */ activeOptions: import("vue").ComputedRef[] | undefined>; /** * 搜索结果 */ searchResult: import("vue").ComputedRef; /** * 通过父级 id 查找路径 * @param parentId * @param path * @param displayNames * @param initial */ getPathByParentId: (parentId: ICascaderOption['value'], path: ICascaderOption[], displayNames: string[], initial?: ICascaderOption['value']) => { path: ICascaderOption[]; displayNames: string[]; }; getOption: (id: ICascaderOption['value']) => ICascaderOption | undefined; getTemporaryOption(): { value: string; option: { value: string; label: string; }; }; isTemporary: (id: ICascaderOption['value']) => boolean; lastIsTemporary: () => boolean; /** * 当前选择的数据用于回显的 label */ getDisplayLabel: () => string; /** * 通过 value 更新路径等信息 * @param value */ updateByValue: (value: CascaderValue) => void; /** * 更新选项数据 * @param options * @param value */ updateByOptions: (options: ICascaderOption[], value?: CascaderValue) => void; pushPath: (option: ICascaderOption) => void; updatePath: (options: ICascaderOption[]) => void; replaceLastPath: (option: ICascaderOption) => void; getLathPath: () => ICascaderOption; updateActiveTab: (value?: ICascaderOption['value']) => void; getValue: () => (string | number | { label: string; value: string | number; })[]; updateLoading: (value: ICascaderOption['value'], status: boolean) => void; getLoading: (value: ICascaderOption['value']) => boolean | undefined; updateSearch: (value: string) => void; } export {};