fix: deleted tag

This commit is contained in:
jialin
2026-04-22 13:16:48 +08:00
committed by jialin
parent 5f3b9b88ff
commit d48aa99dcc
20 changed files with 248 additions and 130 deletions
+16 -1
View File
@@ -1,6 +1,7 @@
// columns.ts
import AutoTooltip from '@/components/auto-tooltip';
import { useIntl } from '@umijs/max';
import { Tag } from 'antd';
import { useMemo } from 'react';
import { BreakdownItem as ListItem } from '../config/types';
@@ -19,9 +20,23 @@ const useModelsColumns = (): Array<{
key: 'api_key_name',
render: (text: string, record: ListItem) => (
<span className="flex items-center">
<AutoTooltip ghost style={{ maxWidth: 400 }}>
<AutoTooltip ghost title={<span>{text}</span>}>
<span className="text-primary">{text}</span>
</AutoTooltip>
{record.api_key?.deleted && (
<Tag
style={{
marginLeft: 8,
borderRadius: 12,
color: 'var(--ant-color-text-tertiary)',
borderColor: 'var(--ant-color-split)',
backgroundColor: 'transparent'
}}
variant="outlined"
>
{intl.formatMessage({ id: 'usage.table.deleted' })}
</Tag>
)}
</span>
)
},