fix: add scroll.x='max-content' to 15 tables, widen narrow columns to prevent header wrapping

This commit is contained in:
2026-07-06 16:10:33 +08:00
parent 4020f79896
commit f4eac7b804
16 changed files with 30 additions and 28 deletions

View File

@@ -194,7 +194,7 @@ const RoomsPage: React.FC = () => {
{
title: '租赁类型',
dataIndex: 'rentalCategory',
width: 80,
width: 100,
render: (v: string) => {
if (v === 'long') return <Tag color="blue"></Tag>;
if (v === 'short') return <Tag color="green"></Tag>;
@@ -204,7 +204,7 @@ const RoomsPage: React.FC = () => {
{
title: '月租金',
dataIndex: 'monthlyRate',
width: 80,
width: 100,
render: (v: number) => (v ? `¥${v}` : '-'),
},
{ title: '额定人数', dataIndex: 'capacity' },
@@ -225,7 +225,7 @@ const RoomsPage: React.FC = () => {
{
title: '性别',
dataIndex: 'gender',
width: 60,
width: 80,
render: (v: any) => (v ? <Tag color={v === '男' ? 'blue' : 'pink'}>{v}</Tag> : '-'),
},
{
@@ -392,7 +392,7 @@ const RoomsPage: React.FC = () => {
columns={columns}
dataSource={filteredData}
rowKey="id"
scroll={{ x: 900 }}
scroll={{ x: 'max-content' }}
loading={loading}
pagination={{ pageSize: 20, showTotal: (total) => `${total}` }}
rowClassName={(record) => (record.status === 'archived' ? 'archived-row' : '')}