import APP from '@/services';
import { Column, TableDefineRsp } from '@/services/go/commonService/interface';
import { ColumnType, TableKey } from './interface';

/**
 * 获取动态表头
 */
export function getTableHead(tableKey: keyof TableKey): Column[] {
    const result = APP.get('tableHead').find((e: TableDefineRsp) => e.tablekey === tableKey);
    return result ? result.columns : [];
}

export type { ColumnType };
