import type { DataType, PropsType } from '../../../configs/components/wd-tree'; type SrcTreeNode = DataType['data'][number]; type CheckedState = '' | 'checked' | 'childChecked'; type SearchedState = '' | 'searched' | 'childSearched'; type ExpandState = '' | 'expand' | 'childExpand'; export interface TreeNode extends SrcTreeNode { checked?: CheckedState; searched?: SearchedState; expanded?: ExpandState; isExpand?: boolean; showIcon?: boolean; root?: TreeNode; parent?: TreeNode; iconShow?: string; pos?: string; } interface IInitData { data: TreeNode[]; parent: TreeNode | null; showIcon: DataType['showIcon']; expendIcon: DataType['expendIcon']; foldIcon: DataType['foldIcon']; leafIcon: DataType['leafIcon']; pos?: string; } interface IInitTreeState { data: TreeNode[]; checkedCustom: DataType['checkedCustom']; expandType: DataType['expandType']; expandCustom: DataType['expandCustom']; searchKey?: string; parentChecked?: CheckedState; } interface IFindNodeParams { tree: TreeNode[]; info: { selected?: string; }; condition: { key: string; value?: string | boolean; alias?: string; aim?: string; infoKey?: string; }[]; } declare const TREE_INFO_GOT: ({ key: string; infoKey: string; alias: string; aim?: undefined; value?: undefined; } | { key: string; infoKey: string; alias: string; aim: string; value?: undefined; } | { key: string; value: boolean; alias: string; infoKey?: undefined; aim?: undefined; } | { key: string; value: boolean; alias: string; aim: string; infoKey?: undefined; } | { key: string; value: string; infoKey?: undefined; alias?: undefined; aim?: undefined; } | { key: string; value: string; alias: string; aim: string; infoKey?: undefined; } | { key: string; value: string; alias: string; infoKey?: undefined; aim?: undefined; })[]; /** * 根据初始值获取用于组件展示的数据 * @param {IInitData} param0 * @returns */ declare const initData: ({ data, parent, showIcon, expendIcon, foldIcon, leafIcon, pos, }: IInitData) => TreeNode[]; /** * 初始化节点状态 * @param param0 * @returns */ declare const initTreeState: ({ data, checkedCustom, expandType, expandCustom, searchKey, parentChecked, }: IInitTreeState) => TreeNode[]; /** * 当某节点的选择状态变化时,处理该节点的父和子的选择状态 * @param treeNode */ declare const dealCheck: (treeNode: TreeNode) => void; /** * 查找满足要求的节点 * @param tree 树 * @param condition 需要获取的内容 * @returns */ declare const findNode: (params: IFindNodeParams) => PropsType['treeInfo']; /** * 根据checkable状态获取树信息 * @param params * @param checkable * @returns */ declare const getTreeInfo: (params: IFindNodeParams, checkable: boolean) => { checkedState?: boolean; selectedState?: boolean; expandedtate?: boolean; expanded: string[]; event: string; checked: string[]; selected: string[]; currentNode: { data?: { label: string; children: any[]; value: string; disabled: boolean; foldIcon: string; expendIcon: string; leafIcon: string; }[]; }; selectedPositions: string[]; selectedNodes: { label: string; children: any[]; value: string; disabled: boolean; foldIcon: string; expendIcon: string; leafIcon: string; }[]; expandedPositions: string[]; expandedNodes: { label: string; children: any[]; value: string; disabled: boolean; foldIcon: string; expendIcon: string; leafIcon: string; }[]; searched: string[]; searchedPositions: string[]; searchedNodes: { label: string; children: any[]; value: string; disabled: boolean; foldIcon: string; expendIcon: string; leafIcon: string; }[]; checkedPositions: string[]; checkedNodes: { label: string; children: any[]; value: string; disabled: boolean; foldIcon: string; expendIcon: string; leafIcon: string; }[]; childChecked: string[]; childCheckedPositions: string[]; childCheckedNodes: { label: string; children: any[]; value: string; disabled: boolean; foldIcon: string; expendIcon: string; leafIcon: string; }[]; }; export { TREE_INFO_GOT, initData, initTreeState, dealCheck, findNode, getTreeInfo, };