UNPKG

shineout

Version:

Shein 前端组件库

35 lines (34 loc) 1.54 kB
/// <reference types="react" /> import { PureComponent } from '../component'; import DatumTree from '../Datum/Tree'; import { TreeProps, UpdateFunc } from './Props'; import { KeygenResult } from '../@types/common'; interface TreeState { active: null | KeygenResult; } declare class Tree<DataItem, Value extends any[]> extends PureComponent<TreeProps<DataItem, Value>, TreeState> { handleDragImageSelector: () => string | undefined; handleClidrenClass: () => string | undefined; handleLeafClass: () => string | undefined; nodes: Map<KeygenResult, UpdateFunc>; datum: DatumTree<DataItem>; static defaultProps: any; constructor(props: TreeProps<DataItem, Value>); componentDidUpdate(prevProps: TreeProps<DataItem, Value>): void; getActive(): KeygenResult | null; getNodeInitState(id: KeygenResult): { active: boolean; expanded: boolean; }; bindDatum(): void; bindNode(id: KeygenResult, update: UpdateFunc): void; unbindNode(id: KeygenResult): void; handleExpanded(expanded?: KeygenResult[]): void; handleActive(active?: KeygenResult): void; handleNodeClick(node: DataItem, id: KeygenResult): void; handleToggle(id: KeygenResult): void; handleDrop(id: KeygenResult, targetId: KeygenResult, position: number): void; handleProps(key: 'dragImageSelector' | 'childrenClass' | 'leafClass'): string | ((data: DataItem) => string) | ((data: DataItem) => string) | ((data: DataItem) => string) | undefined; render(): JSX.Element; } export default Tree;