重构消息通知弹窗

This commit is contained in:
dengqichen 2025-11-28 15:33:29 +08:00
parent b2edf5404f
commit b3b6cb7f19

View File

@ -134,16 +134,18 @@ const ApplicationList: React.FC = () => {
{ {
key: 'category', key: 'category',
title: '应用分类', title: '应用分类',
width: '120px', width: '100px',
className: 'whitespace-nowrap',
render: (_, record) => record.applicationCategory?.name || '-', render: (_, record) => record.applicationCategory?.name || '-',
}, },
{ key: 'appCode', title: '应用编码', dataIndex: 'appCode', width: '200px' }, { key: 'appCode', title: '应用编码', dataIndex: 'appCode', width: '220px', className: 'whitespace-nowrap' },
{ key: 'appName', title: '应用名称', dataIndex: 'appName', width: '130px' }, { key: 'appName', title: '应用名称', dataIndex: 'appName', width: '180px', className: 'whitespace-nowrap' },
{ key: 'appDesc', title: '应用描述', dataIndex: 'appDesc', width: '180px' }, { key: 'appDesc', title: '应用描述', dataIndex: 'appDesc', width: '200px', className: 'whitespace-nowrap' },
{ {
key: 'teamCount', key: 'teamCount',
title: '团队使用数量', title: '团队使用数量',
width: '120px', width: '100px',
className: 'whitespace-nowrap',
render: (_, record) => ( render: (_, record) => (
<div className="text-center"> <div className="text-center">
<span className="font-medium">{record.teamCount || 0}</span> <span className="font-medium">{record.teamCount || 0}</span>
@ -153,11 +155,12 @@ const ApplicationList: React.FC = () => {
{ {
key: 'language', key: 'language',
title: '开发语言', title: '开发语言',
width: '120px', width: '100px',
className: 'whitespace-nowrap',
render: (_, record) => { render: (_, record) => {
const langInfo = getLanguageInfo(record.language); const langInfo = getLanguageInfo(record.language);
return ( return (
<Badge variant="outline" className="flex items-center gap-1 inline-flex"> <Badge variant="outline" className="flex items-center gap-1 inline-flex whitespace-nowrap">
{langInfo.icon} {langInfo.icon}
{langInfo.label} {langInfo.label}
</Badge> </Badge>
@ -167,21 +170,23 @@ const ApplicationList: React.FC = () => {
{ {
key: 'enabled', key: 'enabled',
title: '状态', title: '状态',
width: '100px', width: '70px',
className: 'whitespace-nowrap',
render: (_, record) => ( render: (_, record) => (
<Badge variant={record.enabled ? 'default' : 'secondary'} className="inline-flex"> <Badge variant={record.enabled ? 'default' : 'secondary'} className="inline-flex whitespace-nowrap">
{record.enabled ? '启用' : '禁用'} {record.enabled ? '启用' : '禁用'}
</Badge> </Badge>
), ),
}, },
{ key: 'sort', title: '排序', dataIndex: 'sort', width: '80px' }, { key: 'sort', title: '排序', dataIndex: 'sort', width: '60px', className: 'whitespace-nowrap' },
{ {
key: 'actions', key: 'actions',
title: '操作', title: '操作',
width: '180px', width: '140px',
sticky: true, sticky: true,
className: 'whitespace-nowrap',
render: (_, record) => ( render: (_, record) => (
<div className="flex items-center gap-2"> <div className="flex items-center gap-2 whitespace-nowrap">
<Button variant="ghost" size="sm" onClick={() => handleEdit(record)}> <Button variant="ghost" size="sm" onClick={() => handleEdit(record)}>
<Edit className="h-4 w-4 mr-1" /> <Edit className="h-4 w-4 mr-1" />
</Button> </Button>