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.

20 lines (19 loc) 557 B
export type TreeUtilPosition = 'none' | 'before' | 'after' | 'inside'; type TreeKey = string | ((node: any) => any); interface TreeConfig { key?: TreeKey; childrenKey?: string; } export declare class TreeUtil { private root; private key; private childrenKey; constructor(initialData: any[], config?: TreeConfig); getTree(): any[]; treeMove(sourceKey: any, targetKey: any, position: TreeUtilPosition): void; private getNodeKey; private isSameKey; private findNodeWithParent; private isDescendant; } export {};