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

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

export type { ColumnType };
