1
This commit is contained in:
@@ -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,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,
|
||||
|
||||
Reference in New Issue
Block a user