This commit is contained in:
2026-08-06 13:55:51 +08:00
parent 1e54e3f7f4
commit 4766bab453
13 changed files with 1306 additions and 394 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ import dayjs from 'dayjs';
import {
Button, Card, DatePicker, Divider, Form, Input, InputNumber, message, Modal, Popconfirm, Progress, Select, Space, Switch, Table, Tag, Typography,
} from 'antd';
import type { ColumnsType } from 'antd/es/table';
import {
PlusOutlined, EditOutlined, DeleteOutlined, ApiOutlined, EyeOutlined, KeyOutlined, CopyOutlined,
} from '@ant-design/icons';
@@ -299,7 +300,7 @@ const AdminApiKeys: React.FC = () => {
return cycle ? map[cycle] || cycle : '无限';
};
const columns = [
const columns: ColumnsType<ApiKey> = [
{ title: '公司', dataIndex: 'companyName', width: 120, ellipsis: true },
{
title: 'Key 前缀',
@@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react';
import {
Button, Card, Form, InputNumber, message, Modal, Popconfirm, Select, Space, Table, Tag, Typography,
} from 'antd';
import type { ColumnsType } from 'antd/es/table';
import {
PlusOutlined, EditOutlined, DeleteOutlined, DollarOutlined,
} from '@ant-design/icons';
@@ -69,9 +70,9 @@ const AdminApiModelPricings: React.FC = () => {
const filteredEngines = engines.filter(e => e.genType === genType);
const selectedEngine = engines.find(e => e.id === selectedEngineId);
const resolutions = genType === 'video'
const resolutions: string[] = genType === 'video'
? (selectedEngine?.supportedResolutions?.length ? selectedEngine.supportedResolutions : DEFAULT_VIDEO_RESOLUTIONS)
: (selectedEngine?.supportedSizes?.length ? selectedEngine.supportedSizes : DEFAULT_IMAGE_SIZES);
: (selectedEngine?.supportedSizes?.length ? Object.keys(selectedEngine.supportedSizes) : DEFAULT_IMAGE_SIZES);
const openEdit = (pricing: ApiModelPricing | null = null) => {
if (pricing) {
@@ -146,7 +147,7 @@ const AdminApiModelPricings: React.FC = () => {
}
};
const columns = [
const columns: ColumnsType<ApiModelPricing> = [
{
title: '类型',
dataIndex: 'genType',
+1 -1
View File
@@ -1,6 +1,6 @@
import React, { useEffect, useState } from 'react';
import {
Button, Card, DatePicker, Input, Select, Space, Table, Tag, Typography,
Button, Card, DatePicker, Input, message, Select, Space, Table, Tag, Typography,
} from 'antd';
import {
TableOutlined, ReloadOutlined,