🎨 style: adjust table column widths for better layout
This commit adjusts the column widths in multiple table components to optimize the layout and improve visual consistency:
- TokensTable:
- Reduce ID width from 80px to 50px
- Reduce name width from 160px to 80px
- Reduce group width from 200px to 180px
- Reduce balance width from 200px to 120px
- Reduce operation width from 400px to 350px
- RedemptionsTable:
- Add fixed widths for all columns:
- ID: 50px
- Name: 120px
- Status: 100px
- Quota: 100px
- Created time: 180px
- User ID: 100px
- Operation: 300px
- TaskLogsTable:
- Add fixed widths for all columns:
- Submit time: 180px
- Finish time: 180px
- Duration: 120px
- Channel: 100px
- Platform: 120px
- Type: 120px
- Task ID: 200px
- Status: 120px
- Progress: 160px
- Fail reason: 160px
- UsersTable:
- Add fixed widths for all columns:
- ID: 50px
- Username: 100px
- Group: 100px
- Stats info: 280px
- Invite info: 250px
- Role: 120px
- Status: 100px
- Operation: 150px
These adjustments ensure better space utilization and consistent column sizing across all table components.
This commit is contained in:
@@ -245,16 +245,19 @@ const ChannelsTable = () => {
|
||||
key: COLUMN_KEYS.ID,
|
||||
title: t('ID'),
|
||||
dataIndex: 'id',
|
||||
width: 50,
|
||||
},
|
||||
{
|
||||
key: COLUMN_KEYS.NAME,
|
||||
title: t('名称'),
|
||||
dataIndex: 'name',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
key: COLUMN_KEYS.GROUP,
|
||||
title: t('分组'),
|
||||
dataIndex: 'group',
|
||||
width: 180,
|
||||
render: (text, record, index) => (
|
||||
<div>
|
||||
<Space spacing={2}>
|
||||
@@ -274,6 +277,7 @@ const ChannelsTable = () => {
|
||||
key: COLUMN_KEYS.TYPE,
|
||||
title: t('类型'),
|
||||
dataIndex: 'type',
|
||||
width: 120,
|
||||
render: (text, record, index) => {
|
||||
if (record.children === undefined) {
|
||||
return <>{renderType(text)}</>;
|
||||
@@ -286,6 +290,7 @@ const ChannelsTable = () => {
|
||||
key: COLUMN_KEYS.STATUS,
|
||||
title: t('状态'),
|
||||
dataIndex: 'status',
|
||||
width: 120,
|
||||
render: (text, record, index) => {
|
||||
if (text === 3) {
|
||||
if (record.other_info === '') {
|
||||
@@ -312,6 +317,7 @@ const ChannelsTable = () => {
|
||||
key: COLUMN_KEYS.RESPONSE_TIME,
|
||||
title: t('响应时间'),
|
||||
dataIndex: 'response_time',
|
||||
width: 120,
|
||||
render: (text, record, index) => (
|
||||
<div>{renderResponseTime(text)}</div>
|
||||
),
|
||||
@@ -320,6 +326,7 @@ const ChannelsTable = () => {
|
||||
key: COLUMN_KEYS.BALANCE,
|
||||
title: t('已用/剩余'),
|
||||
dataIndex: 'expired_time',
|
||||
width: 120,
|
||||
render: (text, record, index) => {
|
||||
if (record.children === undefined) {
|
||||
return (
|
||||
@@ -359,6 +366,7 @@ const ChannelsTable = () => {
|
||||
key: COLUMN_KEYS.PRIORITY,
|
||||
title: t('优先级'),
|
||||
dataIndex: 'priority',
|
||||
width: 100,
|
||||
render: (text, record, index) => {
|
||||
if (record.children === undefined) {
|
||||
return (
|
||||
@@ -411,6 +419,7 @@ const ChannelsTable = () => {
|
||||
key: COLUMN_KEYS.WEIGHT,
|
||||
title: t('权重'),
|
||||
dataIndex: 'weight',
|
||||
width: 100,
|
||||
render: (text, record, index) => {
|
||||
if (record.children === undefined) {
|
||||
return (
|
||||
@@ -463,6 +472,7 @@ const ChannelsTable = () => {
|
||||
key: COLUMN_KEYS.OPERATE,
|
||||
title: '',
|
||||
dataIndex: 'operate',
|
||||
width: 350,
|
||||
render: (text, record, index) => {
|
||||
if (record.children === undefined) {
|
||||
// 创建更多操作的下拉菜单项
|
||||
|
||||
Reference in New Issue
Block a user