feat:2、数据显示优化
This commit is contained in:
@@ -58,51 +58,39 @@ export function buildTokenColumns({
|
||||
{
|
||||
title: '0666 编号 / 兑换码',
|
||||
dataIndex: 'upstream_token_id',
|
||||
width: 250,
|
||||
render: (_, record) => (
|
||||
<Space direction="vertical" size={2}>
|
||||
width: 360,
|
||||
onCell: () => ({ style: { whiteSpace: 'nowrap' } }),
|
||||
render: (_, record) => {
|
||||
const text = `${record.upstream_token_id || '-'}/${record.redeem_code || '-'}`
|
||||
const copyText = [record.upstream_token_id, record.redeem_code].filter(Boolean).join('/')
|
||||
return (
|
||||
<Text
|
||||
copyable={record.upstream_token_id ? { text: record.upstream_token_id } : false}
|
||||
style={{ fontWeight: 600 }}
|
||||
copyable={copyText ? { text: copyText } : false}
|
||||
style={{ fontSize: 12, fontFamily: 'monospace', fontWeight: 600, whiteSpace: 'nowrap' }}
|
||||
>
|
||||
0666 #{record.upstream_token_id || '-'}
|
||||
{text}
|
||||
</Text>
|
||||
<Text
|
||||
copyable={record.redeem_code ? { text: record.redeem_code } : false}
|
||||
type="secondary"
|
||||
style={{ fontSize: 12, fontFamily: 'monospace' }}
|
||||
>
|
||||
{record.redeem_code || '-'}
|
||||
</Text>
|
||||
<Text type="secondary" style={{ fontSize: 11 }}>本地 #{record.id}</Text>
|
||||
</Space>
|
||||
),
|
||||
)
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '包ID / 提取码',
|
||||
width: 230,
|
||||
render: (_, record) => (
|
||||
<Space direction="vertical" size={2}>
|
||||
<div style={{ fontSize: 12, color: '#334155' }}>
|
||||
<span style={{ color: '#94a3b8' }}>包ID: </span>
|
||||
{record.package_id ? `#${record.package_id}` : '-'}
|
||||
</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
|
||||
<span style={{ color: '#94a3b8', fontSize: 12 }}>提取码:</span>
|
||||
<Text
|
||||
copyable={record.token ? { text: record.token } : false}
|
||||
style={{ fontSize: 12, fontFamily: 'monospace', fontWeight: 600 }}
|
||||
>
|
||||
{record.token || '-'}
|
||||
</Text>
|
||||
</div>
|
||||
{record.source === 'package' ? (
|
||||
<Tag color="purple" style={{ margin: 0, width: 'fit-content', fontSize: 10 }}>
|
||||
打包导入
|
||||
</Tag>
|
||||
) : null}
|
||||
</Space>
|
||||
),
|
||||
width: 260,
|
||||
render: (_, record) => {
|
||||
const packageText = record.package_id ? String(record.package_id) : '-'
|
||||
const text = `${packageText}/${record.token || '-'}`
|
||||
const copyText = [record.package_id ? String(record.package_id) : '', record.token || '']
|
||||
.filter(Boolean)
|
||||
.join('/')
|
||||
return (
|
||||
<Text
|
||||
copyable={copyText ? { text: copyText } : false}
|
||||
style={{ fontSize: 12, fontFamily: 'monospace', fontWeight: 600, wordBreak: 'break-all' }}
|
||||
>
|
||||
{text}
|
||||
</Text>
|
||||
)
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '规格与适用范围',
|
||||
|
||||
Reference in New Issue
Block a user