From f5a6a22eb1b97a57375b5eea6bd0aa10f1a3fe9b Mon Sep 17 00:00:00 2001 From: puz <13060209078@163.com> Date: Thu, 2 Jul 2026 10:04:15 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=20=E7=95=8C=E9=9D=A2=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/dashboard/index.css | 4 +++- frontend/src/pages/devices/index.less | 10 +++++++--- frontend/src/pages/devices/index.tsx | 5 ++++- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/frontend/src/pages/dashboard/index.css b/frontend/src/pages/dashboard/index.css index 9d3ccb1..2f2374f 100644 --- a/frontend/src/pages/dashboard/index.css +++ b/frontend/src/pages/dashboard/index.css @@ -88,7 +88,8 @@ min-height: 0; overflow-y: auto; overflow-x: hidden; - padding-right: 6px; + padding-right: 18px; + scrollbar-gutter: stable; } .dashboard-monitor-page__task-list .dashboard-monitor-page__task-item { @@ -137,6 +138,7 @@ display: flex; align-items: center; justify-content: flex-end; + padding-right: 4px; } .dashboard-monitor-page__steps { diff --git a/frontend/src/pages/devices/index.less b/frontend/src/pages/devices/index.less index 9315697..10edc19 100644 --- a/frontend/src/pages/devices/index.less +++ b/frontend/src/pages/devices/index.less @@ -102,9 +102,13 @@ font-variant-numeric: tabular-nums; } -.app-page__table-wrap .ant-table-wrapper .ant-table-cell-fix-right-first, -.app-page__table-wrap .ant-table-wrapper .ant-table-cell-fix-right-last { - right: 0 !important; +.devices-table__action-cell { + min-width: 220px; +} + +.devices-table__action-cell .ant-space { + display: inline-flex; + min-width: 0; } @media (max-width: 768px) { diff --git a/frontend/src/pages/devices/index.tsx b/frontend/src/pages/devices/index.tsx index 9919d77..4d092f5 100644 --- a/frontend/src/pages/devices/index.tsx +++ b/frontend/src/pages/devices/index.tsx @@ -16,6 +16,7 @@ import "./index.less"; const { Text } = Typography; const DEFAULT_TABLE_PAGE_SIZE = getDefaultPageSize("table"); +const DEVICE_TABLE_SCROLL_X = 1960; type DeviceFormValues = { deviceName?: string; @@ -232,6 +233,7 @@ export default function Devices() { { title: t("devicesExt.weatherCityName"), dataIndex: "weatherCityName", + width: 140, render: (text: string) => {text || "-"} }, { @@ -258,6 +260,7 @@ export default function Devices() { key: "action", width: 220, fixed: "right" as const, + className: "devices-table__action-cell", render: (_value: unknown, record: DeviceInfo) => ( {can("device:update") ? ( @@ -353,7 +356,7 @@ export default function Devices() { dataSource={pagedData} loading={loading} columns={columns} - scroll={{y: "100%", x: 1980}} + scroll={{y: "100%", x: DEVICE_TABLE_SCROLL_X}} pagination={false} />