UNPKG

e-virt-table

Version:

A powerful data table based on canvas. You can use it as data grid、Microsoft Excel or Google sheets. It supports virtual scroll、cell edit etc.

19 lines (18 loc) 524 B
type Position = 'before' | 'after'; interface TreeConfig { key?: string; childrenKey?: string; } export declare class TreeUtil<T extends Record<string, any> = any> { private root; private key; private childrenKey; constructor(initialData: T[], config?: TreeConfig); /** 获取当前树 */ getTree(): T[]; /** 移动节点 */ treeMove(sourceNode: T, targetNode: T, position: Position): void; /** 在树中找到节点及其父节点 */ private findNodeWithParent; } export {};