feat: 合并代码后 系统设置 ui样式优化、bug修复、全局统一图标对齐等
This commit is contained in:
@@ -34,7 +34,7 @@ import {
|
||||
Tag,
|
||||
Typography,
|
||||
} from '@/components/ui';
|
||||
import { IconDelete, IconEdit, IconPlus } from '@/components/ui/icons';
|
||||
import { IconDelete, IconPlus } from '@/components/ui/icons';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { API, showError, showSuccess } from '../../../helpers';
|
||||
|
||||
@@ -356,23 +356,20 @@ export default function SettingImagePricing({ options, refresh }) {
|
||||
render: (_text, record, index) => (
|
||||
<Space>
|
||||
<Button
|
||||
icon={<IconEdit />}
|
||||
size='small'
|
||||
theme='borderless'
|
||||
aria-label={t('编辑')}
|
||||
onClick={() => openEdit(record, index)}
|
||||
/>
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('编辑')}
|
||||
</Button>
|
||||
<Popconfirm
|
||||
title={t('确定删除此图片定价配置吗?')}
|
||||
onConfirm={() => remove(index)}
|
||||
>
|
||||
<Button
|
||||
icon={<IconDelete />}
|
||||
size='small'
|
||||
type='danger'
|
||||
theme='borderless'
|
||||
aria-label={t('删除')}
|
||||
/>
|
||||
<Button aria-label={t('删除')} type='link' size='small' danger>
|
||||
{t('删除')}
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
</Space>
|
||||
),
|
||||
|
||||
@@ -246,7 +246,11 @@ const SettingModelCategory = () => {
|
||||
width: 150,
|
||||
render: (text, record) => (
|
||||
<Space>
|
||||
<Button size='small' onClick={() => handleEditLevel1(record)}>
|
||||
<Button
|
||||
onClick={() => handleEditLevel1(record)}
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('修改')}
|
||||
</Button>
|
||||
<Popconfirm
|
||||
@@ -256,7 +260,7 @@ const SettingModelCategory = () => {
|
||||
okText={t('确定')}
|
||||
cancelText={t('取消')}
|
||||
>
|
||||
<Button size='small' type='danger'>
|
||||
<Button type='link' size='small' danger>
|
||||
{t('删除')}
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
@@ -292,7 +296,11 @@ const SettingModelCategory = () => {
|
||||
width: 150,
|
||||
render: (text, record) => (
|
||||
<Space>
|
||||
<Button size='small' onClick={() => handleEditLevel2(record)}>
|
||||
<Button
|
||||
onClick={() => handleEditLevel2(record)}
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('修改')}
|
||||
</Button>
|
||||
<Popconfirm
|
||||
@@ -302,7 +310,7 @@ const SettingModelCategory = () => {
|
||||
okText={t('确定')}
|
||||
cancelText={t('取消')}
|
||||
>
|
||||
<Button size='small' type='danger'>
|
||||
<Button type='link' size='small' danger>
|
||||
{t('删除')}
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
@@ -402,20 +410,19 @@ const SettingModelCategory = () => {
|
||||
{t('新建二级分类')}
|
||||
</Button>
|
||||
</div>
|
||||
{selectedLevel1Id ? (
|
||||
<Table
|
||||
// 列宽合计远超窄屏视口;没有 scroll 时表格会压缩到 min-content 硬塞进去,
|
||||
// 末尾的操作列落在视口外,且 iOS 上滚动条不可见、毫无可拖动提示
|
||||
scroll={{ x: 'max-content' }}
|
||||
columns={level2Columns}
|
||||
dataSource={level2Categories}
|
||||
rowKey='id'
|
||||
pagination={false}
|
||||
empty={<Empty description={t('暂无数据')} />}
|
||||
/>
|
||||
) : (
|
||||
<Empty description={t('请先选择一级分类')} />
|
||||
{!selectedLevel1Id && (
|
||||
<div className='mb-3'>{t('请先选择一级分类')}</div>
|
||||
)}
|
||||
<Table
|
||||
// 列宽合计远超窄屏视口;没有 scroll 时表格会压缩到 min-content 硬塞进去,
|
||||
// 末尾的操作列落在视口外,且 iOS 上滚动条不可见、毫无可拖动提示
|
||||
scroll={{ x: 'max-content' }}
|
||||
columns={level2Columns}
|
||||
dataSource={level2Categories}
|
||||
rowKey='id'
|
||||
pagination={false}
|
||||
empty={<Empty description={t('暂无数据')} />}
|
||||
/>
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ import {
|
||||
Switch,
|
||||
Typography,
|
||||
} from '@/components/ui';
|
||||
import { IconPlus, IconDelete, IconEdit } from '@/components/ui/icons';
|
||||
import { IconPlus, IconDelete } from '@/components/ui/icons';
|
||||
import { API, showError, showSuccess } from '../../../helpers';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -373,15 +373,19 @@ export default function SettingVideoModel(props) {
|
||||
render: (text, record, index) => (
|
||||
<Space>
|
||||
<Button
|
||||
icon={<IconEdit />}
|
||||
size='small'
|
||||
onClick={() => handleEditPricing(record, index)}
|
||||
/>
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('编辑')}
|
||||
</Button>
|
||||
<Popconfirm
|
||||
title={t('确定要删除此定价配置吗?')}
|
||||
onConfirm={() => handleDeletePricing(index)}
|
||||
>
|
||||
<Button icon={<IconDelete />} size='small' type='danger' />
|
||||
<Button type='link' size='small' danger>
|
||||
{t('删除')}
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
</Space>
|
||||
),
|
||||
@@ -450,15 +454,19 @@ export default function SettingVideoModel(props) {
|
||||
render: (text, record, index) => (
|
||||
<Space>
|
||||
<Button
|
||||
icon={<IconEdit />}
|
||||
size='small'
|
||||
onClick={() => handleEditModel(record, index)}
|
||||
/>
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('编辑')}
|
||||
</Button>
|
||||
<Popconfirm
|
||||
title={t('确定要删除此模型吗?')}
|
||||
onConfirm={() => handleDeleteModel(index)}
|
||||
>
|
||||
<Button icon={<IconDelete />} size='small' type='danger' />
|
||||
<Button type='link' size='small' danger>
|
||||
{t('删除')}
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
</Space>
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user