From bd9e67383eba369720ab5718f511e17697193353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=9F=91=E8=9E=82?= Date: Fri, 22 May 2026 01:19:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B4=A2=E5=8A=A1tab=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E6=9C=80=E5=90=8E=E4=B8=80=E5=88=97=E5=9B=BA=E5=AE=9A=E5=8F=B3?= =?UTF-8?q?=E4=BE=A7=E5=8F=8A=E6=B7=B1=E8=89=B2=E6=A8=A1=E5=BC=8F=E5=AD=97?= =?UTF-8?q?=E4=BD=93=E5=8F=AF=E8=A7=81=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/CategoryComparisonTable.vue | 12 ++++++-- .../components/PlatformSummaryCard.vue | 14 +++++++-- .../components/ShopComparisonTable.vue | 30 +++++++++++++++++-- 3 files changed, 49 insertions(+), 7 deletions(-) diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/workbench/tabs/finance/components/CategoryComparisonTable.vue b/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/workbench/tabs/finance/components/CategoryComparisonTable.vue index a73cfdb3..bf8c4f70 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/workbench/tabs/finance/components/CategoryComparisonTable.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/workbench/tabs/finance/components/CategoryComparisonTable.vue @@ -154,7 +154,7 @@ const cellRoi = (v: number | null | undefined) => 盈利分析维度 @@ -277,7 +277,7 @@ const cellRoi = (v: number | null | undefined) => {{ cellRoi(cat.roi) }} - + {{ cellMoney(cat.profitAfterTax) }} @@ -338,4 +338,12 @@ thead { top: 0; z-index: 20; } + +thead tr:last-child th:last-child, +tbody td:last-child:not([colspan]), +tfoot td:last-child:not([colspan]) { + position: sticky; + right: 0; + z-index: 10; +} diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/workbench/tabs/finance/components/PlatformSummaryCard.vue b/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/workbench/tabs/finance/components/PlatformSummaryCard.vue index e4825dfb..0fab8a1a 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/workbench/tabs/finance/components/PlatformSummaryCard.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/workbench/tabs/finance/components/PlatformSummaryCard.vue @@ -217,7 +217,7 @@ const sortedData = computed(() => { 盈利分析维度 @@ -358,8 +358,8 @@ const sortedData = computed(() => { {{ formatAmount(p.salesTaxAmount) }} {{ p.roi.toFixed(2) }} {{ formatAmount(p.profitAfterTax) }} @@ -440,4 +440,12 @@ thead { top: 0; z-index: 20; } + +thead tr:last-child th:last-child, +tbody td:last-child:not([colspan]), +tfoot td:last-child:not([colspan]) { + position: sticky; + right: 0; + z-index: 10; +} diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/workbench/tabs/finance/components/ShopComparisonTable.vue b/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/workbench/tabs/finance/components/ShopComparisonTable.vue index 0e0dc6e9..13f2d7a2 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/workbench/tabs/finance/components/ShopComparisonTable.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/workbench/tabs/finance/components/ShopComparisonTable.vue @@ -172,7 +172,7 @@ const cellRoi = (v: number | null | undefined) => 盈利分析维度 @@ -362,7 +362,7 @@ const cellRoi = (v: number | null | undefined) => {{ cellRoi(shop.roi) }} - + {{ cellMoney(shop.profitAfterTax) }} @@ -440,6 +440,32 @@ const cellRoi = (v: number | null | undefined) => overflow: auto; } +thead { + position: sticky; + top: 0; + z-index: 20; +} + +/* 最后一列(税后盈亏)固定在右侧 */ +thead tr:last-child th:last-child, +tbody td:last-child:not([colspan]), +tfoot td:last-child:not([colspan]) { + position: sticky; + right: 0; + z-index: 10; +} + +.sticky-right { + position: sticky; + right: 0; + z-index: 10; +} + +.table-container { + max-height: 1000px; + overflow: auto; +} + thead { position: sticky; top: 0;