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