style: 修复前端 UI 细节问题
- 供应商/模型/统计表格增加列宽约束和 ellipsis 省略号 - 修复主题切换按钮在暗色侧边栏中不可见 - 表格添加 scroll 属性防止窄屏溢出 - 自定义表格空状态提示文案
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Button, Table, Tag, Popconfirm, Space, Card } from 'antd';
|
||||
import { Button, Table, Tag, Popconfirm, Space, Card, Tooltip } from 'antd';
|
||||
import type { ColumnsType } from 'antd/es/table';
|
||||
import type { Provider, Model } from '@/types';
|
||||
import { ModelTable } from './ModelTable';
|
||||
@@ -33,17 +33,26 @@ export function ProviderTable({
|
||||
title: '名称',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
width: 180,
|
||||
ellipsis: { showTitle: true },
|
||||
},
|
||||
{
|
||||
title: 'Base URL',
|
||||
dataIndex: 'baseUrl',
|
||||
key: 'baseUrl',
|
||||
ellipsis: { showTitle: true },
|
||||
},
|
||||
{
|
||||
title: 'API Key',
|
||||
dataIndex: 'apiKey',
|
||||
key: 'apiKey',
|
||||
render: (key: string | null | undefined) => maskApiKey(key),
|
||||
width: 120,
|
||||
ellipsis: { showTitle: true },
|
||||
render: (key: string | null | undefined) => (
|
||||
<Tooltip title={maskApiKey(key)}>
|
||||
<span>{maskApiKey(key)}</span>
|
||||
</Tooltip>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
@@ -101,6 +110,8 @@ export function ProviderTable({
|
||||
),
|
||||
}}
|
||||
pagination={false}
|
||||
scroll={{ x: 840 }}
|
||||
locale={{ emptyText: '暂无供应商,点击上方按钮添加' }}
|
||||
/>
|
||||
</Card>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user