feat: 自行开发设计 ui样式优化 超管端-控制台 相关的页面
This commit is contained in:
@@ -35,11 +35,7 @@ import {
|
||||
Typography,
|
||||
} from '@/components/ui';
|
||||
import { IconPlus, IconDelete, IconEdit } from '@/components/ui/icons';
|
||||
import {
|
||||
API,
|
||||
showError,
|
||||
showSuccess,
|
||||
} from '../../../helpers';
|
||||
import { API, showError, showSuccess } from '../../../helpers';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
// 视频相关的渠道类型
|
||||
@@ -306,7 +302,10 @@ export default function SettingVideoModel(props) {
|
||||
model_name: values.model_name,
|
||||
tier_param: values.tier_param || 'resolution',
|
||||
default_tier: defaultTier,
|
||||
default_duration: Math.max(0, parseInt(values.default_duration, 10) || 0),
|
||||
default_duration: Math.max(
|
||||
0,
|
||||
parseInt(values.default_duration, 10) || 0,
|
||||
),
|
||||
enabled: values.enabled !== false,
|
||||
tiers,
|
||||
};
|
||||
@@ -563,8 +562,11 @@ export default function SettingVideoModel(props) {
|
||||
<Col span={24}>
|
||||
<Table
|
||||
columns={columns}
|
||||
dataSource={models}
|
||||
rowKey={(record, index) => index}
|
||||
dataSource={models.map((record, index) => ({
|
||||
...record,
|
||||
key: index,
|
||||
}))}
|
||||
rowKey='key'
|
||||
pagination={false}
|
||||
empty={t('暂无自定义视频模型')}
|
||||
/>
|
||||
@@ -619,8 +621,11 @@ export default function SettingVideoModel(props) {
|
||||
<Col span={24}>
|
||||
<Table
|
||||
columns={pricingColumns}
|
||||
dataSource={pricingConfigs}
|
||||
rowKey={(record, index) => index}
|
||||
dataSource={pricingConfigs.map((record, index) => ({
|
||||
...record,
|
||||
key: index,
|
||||
}))}
|
||||
rowKey='key'
|
||||
pagination={false}
|
||||
empty={t('暂无按秒分档定价配置')}
|
||||
/>
|
||||
@@ -729,9 +734,7 @@ export default function SettingVideoModel(props) {
|
||||
</Modal>
|
||||
|
||||
<Modal
|
||||
title={
|
||||
editingPricingIndex >= 0 ? t('编辑定价配置') : t('添加定价配置')
|
||||
}
|
||||
title={editingPricingIndex >= 0 ? t('编辑定价配置') : t('添加定价配置')}
|
||||
visible={pricingModalVisible}
|
||||
onOk={handlePricingModalOk}
|
||||
onCancel={() => setPricingModalVisible(false)}
|
||||
@@ -754,7 +757,9 @@ export default function SettingVideoModel(props) {
|
||||
label={t('模型名称')}
|
||||
placeholder={t('请输入模型名称,如 kling-v2-master')}
|
||||
rules={[{ required: true, message: t('请输入模型名称') }]}
|
||||
extraText={t('支持前缀匹配,例如填 kling 可匹配所有 kling 开头模型')}
|
||||
extraText={t(
|
||||
'支持前缀匹配,例如填 kling 可匹配所有 kling 开头模型',
|
||||
)}
|
||||
/>
|
||||
<Form.Select
|
||||
field='tier_param'
|
||||
@@ -873,9 +878,7 @@ export default function SettingVideoModel(props) {
|
||||
step={0.01}
|
||||
style={{ width: '100%' }}
|
||||
value={row.price_per_second}
|
||||
onChange={(v) =>
|
||||
updateTierRow(idx, { price_per_second: v })
|
||||
}
|
||||
onChange={(v) => updateTierRow(idx, { price_per_second: v })}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={7}>
|
||||
|
||||
Reference in New Issue
Block a user