chore: locales

This commit is contained in:
jialin
2026-04-22 13:16:48 +08:00
committed by jialin
parent c92f56ec8f
commit 128f59ed6f
15 changed files with 287 additions and 97 deletions
+5 -4
View File
@@ -5,6 +5,7 @@ import {
} from '@/atoms/usage';
import { exportJsonToExcel } from '@/utils/excel-reader';
import { useStore } from 'jotai';
import _ from 'lodash';
import useAPIKeysColumns from './use-apikeys-columns';
import useModelsColumns from './use-models-columns';
import useUsersColumns from './use-users-columns';
@@ -26,11 +27,11 @@ const useExportTable = () => {
jsonData: modelsTableData.dataList || [],
sheetName: 'models',
fields: modelsColumns
.map((col: any) => col.dataIndex)
.map((col: any) => _.join(col.dataIndex, '_'))
.filter(Boolean) as string[],
fieldLabels: modelsColumns.reduce(
(map, col) => {
map[col.dataIndex] = col.title;
map[_.join(col.dataIndex, '_')] = col.title;
return map;
},
{} as Record<string, any>
@@ -45,7 +46,7 @@ const useExportTable = () => {
.filter(Boolean) as string[],
fieldLabels: apiKeysColumns.reduce(
(map, col) => {
map[col.dataIndex] = col.title;
map[_.join(col.dataIndex, '_')] = col.title;
return map;
},
{} as Record<string, any>
@@ -60,7 +61,7 @@ const useExportTable = () => {
.filter(Boolean) as string[],
fieldLabels: usersColumns.reduce(
(map, col) => {
map[col.dataIndex] = col.title;
map[_.join(col.dataIndex, '_')] = col.title;
return map;
},
{} as Record<string, any>