diff --git a/web/src/components/accounts/AccountManagementList.tsx b/web/src/components/accounts/AccountManagementList.tsx index eae7efa..6112cc6 100644 --- a/web/src/components/accounts/AccountManagementList.tsx +++ b/web/src/components/accounts/AccountManagementList.tsx @@ -8,6 +8,7 @@ import { PlusOutlined, ReloadOutlined } from '@ant-design/icons'; import type { ColumnsType } from 'antd/es/table'; import { remove, creatorUpdate, creatorGet } from '@/services/api'; import { conflictMessage, dateTime } from '@/utils/helpers'; +import { fixedRight, tablePagination, tableScroll } from '@/utils/table'; // 仅用 antd 默认组件:Table/Tag/Modal/Popconfirm/Select(tags)。 interface Row { @@ -113,7 +114,7 @@ export default function AccountManagementList() { { title: '标签', dataIndex: 'tags', - render: (tags?: string[]) => (tags?.length ? tags.map((tag) => {tag}) : 未设置) }, + render: (tags?: string[]) => (tags?.length ? {tags.map((tag) => {tag})} : 未设置) }, { title: '状态', dataIndex: 'status', @@ -129,6 +130,7 @@ export default function AccountManagementList() { title: '操作', key: 'actions', align: 'right', + ...fixedRight({}), render: (_, account) => ( @@ -218,9 +220,10 @@ export default function MonitoringAccountList() { columns={columns} dataSource={rows} loading={pending} - pagination={false} + sticky + pagination={tablePagination()} locale={{ emptyText: '暂无监控账号。' }} - scroll={{ x: 1100 }} + scroll={tableScroll(1100)} /> ({}), render: (_, job) => job.status === 'failed' ? ( } /> ) : null} - +
diff --git a/web/src/pages/browsers/index.tsx b/web/src/pages/browsers/index.tsx index 58435f9..8b523e2 100644 --- a/web/src/pages/browsers/index.tsx +++ b/web/src/pages/browsers/index.tsx @@ -6,6 +6,7 @@ import { Alert, App, Button, Card, Flex, Popconfirm, Space, Table, Tag, Typograp import { CopyOutlined, PlusOutlined } from '@ant-design/icons'; import type { ColumnsType } from 'antd/es/table'; import { browserAction, getList } from '@/services/api'; +import { fixedRight, tablePagination, tableScroll } from '@/utils/table'; const stateText: Record = { created: '已创建', @@ -124,6 +125,7 @@ export default function Page() { title: '操作', key: 'actions', align: 'right', + ...fixedRight({}), render: (_, runtime) => { const running = runtime.state === 'running'; const stopping = ['running', 'degraded', 'starting', 'failed', 'cleanup_pending'].includes(runtime.state); @@ -169,7 +171,9 @@ export default function Page() { columns={columns} dataSource={runtimes} loading={pending} - pagination={false} + sticky + pagination={tablePagination()} + scroll={tableScroll(1000)} locale={{ emptyText: '暂无运行环境,创建第一个隔离 Profile。' }} /> diff --git a/web/src/pages/gateways/index.tsx b/web/src/pages/gateways/index.tsx index 5b5b638..93bf7f9 100644 --- a/web/src/pages/gateways/index.tsx +++ b/web/src/pages/gateways/index.tsx @@ -5,6 +5,7 @@ import { CopyOutlined, EyeInvisibleOutlined, EyeOutlined, PlusOutlined } from '@ import type { ColumnsType } from 'antd/es/table'; import { create, getList, remove, update } from '@/services/api'; import { conflictMessage } from '@/utils/helpers'; +import { fixedRight, tablePagination, tableScroll } from '@/utils/table'; const namePattern = /^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/; const tokenPattern = /^[A-Za-z0-9][A-Za-z0-9._-]{15,127}$/; @@ -152,6 +153,7 @@ export default function Page() { title: '操作', key: 'actions', align: 'right', + ...fixedRight({}), render: (_, gateway) => ( } /> ) : null} -
+
= { unchecked: '未检测', @@ -243,6 +244,7 @@ export default function Page() { title: '操作', key: 'actions', align: 'right', + ...fixedRight({}), render: (_, exit) => (