forked from wangziqi/gongxue-base
fix(admin): fix column widths and scroll.x for Attendance and Roles pages
- Attendance: remove ellipsis from 备注 column, scroll.x 1100 -> 1200 - Roles: adjust column widths (ID 60->80, 系统 70->80, 操作 160->180), remove ellipsis from 描述 and 权限标签 - Teachers: already correct (verified all widths match spec) - Permissions: card-based layout, no Table component - no changes needed - Notifications: List-based layout, no Table component - no changes needed
This commit is contained in:
@@ -529,7 +529,6 @@ const AttendancePage: React.FC = () => {
|
|||||||
dataIndex: 'remark',
|
dataIndex: 'remark',
|
||||||
key: 'remark',
|
key: 'remark',
|
||||||
width: 150,
|
width: 150,
|
||||||
ellipsis: true,
|
|
||||||
render: (v: string | null) => v || '-',
|
render: (v: string | null) => v || '-',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -691,7 +690,7 @@ const AttendancePage: React.FC = () => {
|
|||||||
columns={columns}
|
columns={columns}
|
||||||
dataSource={records}
|
dataSource={records}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
scroll={{ x: 1100 }}
|
scroll={{ x: 1200 }}
|
||||||
pagination={{
|
pagination={{
|
||||||
current: page,
|
current: page,
|
||||||
pageSize,
|
pageSize,
|
||||||
|
|||||||
@@ -127,14 +127,13 @@ const RolesPage: React.FC = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{ title: 'ID', dataIndex: 'id', width: 60 },
|
{ title: 'ID', dataIndex: 'id', width: 80 },
|
||||||
{ title: '名称', dataIndex: 'name', width: 120 },
|
{ title: '名称', dataIndex: 'name', width: 120 },
|
||||||
{ title: '描述', dataIndex: 'description', width: 200, ellipsis: true },
|
{ title: '描述', dataIndex: 'description', width: 200 },
|
||||||
{
|
{
|
||||||
title: '权限标签',
|
title: '权限标签',
|
||||||
dataIndex: 'permissions',
|
dataIndex: 'permissions',
|
||||||
width: 150,
|
width: 150,
|
||||||
ellipsis: true,
|
|
||||||
render: (perms: PermissionItem[]) =>
|
render: (perms: PermissionItem[]) =>
|
||||||
perms?.length > 0 ? (
|
perms?.length > 0 ? (
|
||||||
<Tag color="blue">{perms.length} 个权限</Tag>
|
<Tag color="blue">{perms.length} 个权限</Tag>
|
||||||
@@ -145,12 +144,12 @@ const RolesPage: React.FC = () => {
|
|||||||
{
|
{
|
||||||
title: '系统',
|
title: '系统',
|
||||||
dataIndex: 'isSystem',
|
dataIndex: 'isSystem',
|
||||||
width: 70,
|
width: 80,
|
||||||
render: (v: boolean) => (v ? <Tag color="orange">系统</Tag> : null),
|
render: (v: boolean) => (v ? <Tag color="orange">系统</Tag> : null),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
width: 160,
|
width: 180,
|
||||||
fixed: 'right' as const,
|
fixed: 'right' as const,
|
||||||
render: (_: any, record: RoleItem) => (
|
render: (_: any, record: RoleItem) => (
|
||||||
<Space>
|
<Space>
|
||||||
|
|||||||
Reference in New Issue
Block a user