forked from pu428f3pz/InternshipProject
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
574 B
18 lines
574 B
import type { GetRowKey, Key } from '@/interface';
|
|
/**
|
|
* flat tree data on expanded state
|
|
*
|
|
* @export
|
|
* @template T
|
|
* @param {*} data : table data
|
|
* @param {string} childrenColumnName : 指定树形结构的列名
|
|
* @param {Set<Key>} expandedKeys : 展开的行对应的keys
|
|
* @param {GetRowKey<T>} getRowKey : 获取当前rowKey的方法
|
|
* @returns flattened data
|
|
*/
|
|
export default function useFlattenRecords<T>(data: any, childrenColumnName: string, expandedKeys: Set<Key>, getRowKey: GetRowKey<T>): {
|
|
record: T;
|
|
indent: number;
|
|
index: number;
|
|
}[];
|