fix(distribution-admin): 全面优化全站表格列宽、单号防折行、平台与状态中文化体验
This commit is contained in:
@@ -85,7 +85,7 @@ export default function Sites({ isSuperadmin = true }: { isSuperadmin?: boolean
|
||||
}
|
||||
|
||||
return (
|
||||
<Space direction="vertical" className="page" size="large">
|
||||
<Space direction="vertical" className="page" size="large" style={{ width: '100%' }}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||
<div>
|
||||
<Typography.Title level={3} style={{ margin: 0 }}>
|
||||
@@ -108,10 +108,12 @@ export default function Sites({ isSuperadmin = true }: { isSuperadmin?: boolean
|
||||
dataSource={items}
|
||||
loading={loading}
|
||||
pagination={false}
|
||||
scroll={{ x: 950 }}
|
||||
columns={[
|
||||
{
|
||||
title: '站点名称',
|
||||
dataIndex: 'site_name',
|
||||
width: 220,
|
||||
render: (v: string) => (
|
||||
<Space>
|
||||
<ShopOutlined style={{ color: '#1677ff' }} />
|
||||
@@ -119,11 +121,26 @@ export default function Sites({ isSuperadmin = true }: { isSuperadmin?: boolean
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
{ title: '站点标识', dataIndex: 'site_code', render: (v: string) => <Tag>{v}</Tag> },
|
||||
{ title: '绑定域名', dataIndex: 'domain' },
|
||||
{
|
||||
title: '站点标识',
|
||||
dataIndex: 'site_code',
|
||||
width: 140,
|
||||
render: (v: string) => <Tag color="blue">{v}</Tag>,
|
||||
},
|
||||
{
|
||||
title: '绑定域名',
|
||||
dataIndex: 'domain',
|
||||
width: 220,
|
||||
render: (v: string) => (
|
||||
<Typography.Text copyable={{ text: v }} className="mono-code" style={{ fontSize: 13 }}>
|
||||
{v}
|
||||
</Typography.Text>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '运行状态',
|
||||
dataIndex: 'status',
|
||||
width: 110,
|
||||
render: (v: string) => (
|
||||
<Tag color={v === 'active' ? 'green' : 'default'}>
|
||||
{v === 'active' ? '正常运营' : v}
|
||||
@@ -133,16 +150,19 @@ export default function Sites({ isSuperadmin = true }: { isSuperadmin?: boolean
|
||||
{
|
||||
title: '账号展示',
|
||||
dataIndex: 'display_account_enabled',
|
||||
width: 100,
|
||||
render: (v: boolean) => (v ? <Tag color="green">开启</Tag> : <Tag>关闭</Tag>),
|
||||
},
|
||||
{
|
||||
title: '税费设定',
|
||||
width: 110,
|
||||
render: (_: unknown, row: Site) =>
|
||||
row.tax_enabled ? <Tag color="orange">{row.tax_rate_bps / 100}%</Tag> : <Tag>不征税</Tag>,
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
dataIndex: 'created_at',
|
||||
width: 140,
|
||||
render: (v: string) => (v ? new Date(v).toLocaleDateString() : '-'),
|
||||
},
|
||||
]}
|
||||
|
||||
Reference in New Issue
Block a user