From b3b419451eac159a80d22e5d5ae232e557df4b7c Mon Sep 17 00:00:00 2001 From: qiuxiang <394405259@qq.com> Date: Sat, 24 Oct 2026 14:47:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=89=E8=A3=85=E6=98=8E=E7=BB=86?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E6=A8=AA=E5=90=91=E8=A1=A8=E5=A4=B4=E7=9C=81?= =?UTF-8?q?=E7=95=A5=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/business/pages/show.blade.php | 68 +++++++++++-------- tests/Feature/Business/ManagementCrudTest.php | 2 + 2 files changed, 40 insertions(+), 30 deletions(-) diff --git a/resources/views/business/pages/show.blade.php b/resources/views/business/pages/show.blade.php index e947a636..3fc0b687 100644 --- a/resources/views/business/pages/show.blade.php +++ b/resources/views/business/pages/show.blade.php @@ -313,33 +313,34 @@ } .installation-details-table-wrap { - overflow-x: hidden; + overflow-x: auto; } .installation-details-table { - width: 100%; - table-layout: fixed; + width: max-content; + min-width: 100%; + table-layout: auto; font-size: 0.625rem; } .installation-details-table thead th { - height: 5.25rem; - padding: 0.2rem 0.1rem; - writing-mode: vertical-rl; - text-orientation: mixed; - vertical-align: bottom; - line-height: 1.15; + height: auto; + padding: 0.55rem 0.4rem; + writing-mode: horizontal-tb; + vertical-align: middle; + line-height: 1.25; letter-spacing: 0; - white-space: normal; + white-space: nowrap; } .installation-details-table tbody td { - padding: 0.25rem 0.1rem; - vertical-align: top; - line-height: 1.25; - white-space: normal; - overflow-wrap: anywhere; - word-break: break-word; + max-width: 8rem; + padding: 0.35rem 0.4rem; + overflow: hidden; + vertical-align: middle; + line-height: 1.35; + text-overflow: ellipsis; + white-space: nowrap; } .installation-details-table .biz-badge { @@ -352,7 +353,8 @@ .installation-details-table th:first-child, .installation-details-table td:first-child { - width: 4.75rem; + min-width: 7rem; + width: auto; } .installation-expand { @@ -372,20 +374,19 @@ } .installation-detail-table { - width: 100%; - table-layout: fixed; + width: max-content; + min-width: 100%; + table-layout: auto; border-collapse: collapse; font-size: 0.625rem; } .installation-detail-table th, .installation-detail-table td { - padding: 0.25rem 0.1rem; + padding: 0.35rem 0.4rem; border: 1px solid #e5e0d7; - white-space: normal; - overflow-wrap: anywhere; - word-break: break-word; - vertical-align: top; + white-space: nowrap; + vertical-align: middle; text-align: left; } @@ -393,11 +394,15 @@ background: #f3efe6; color: #595959; font-weight: 600; - height: 4.75rem; - writing-mode: vertical-rl; - text-orientation: mixed; - vertical-align: bottom; - line-height: 1.15; + height: auto; + writing-mode: horizontal-tb; + line-height: 1.25; + } + + .installation-detail-table td { + max-width: 9rem; + overflow: hidden; + text-overflow: ellipsis; } .installation-detail-empty, @@ -940,7 +945,10 @@ const renderDetails = (items) => { if (!items.length) return '
暂无商品明细
'; const head = columns.map(([, label]) => `${escapeHtml(label)}`).join(''); - const body = items.map((item) => `${columns.map(([key]) => `${escapeHtml(item[key])}`).join('')}`).join(''); + const body = items.map((item) => `${columns.map(([key]) => { + const value = escapeHtml(item[key]); + return `${value}`; + }).join('')}`).join(''); return `${head}${body}
`; }; const detailPanel = document.querySelector('[data-installation-detail-panel]'); diff --git a/tests/Feature/Business/ManagementCrudTest.php b/tests/Feature/Business/ManagementCrudTest.php index dfb366a8..3e2b2b95 100644 --- a/tests/Feature/Business/ManagementCrudTest.php +++ b/tests/Feature/Business/ManagementCrudTest.php @@ -249,6 +249,8 @@ class ManagementCrudTest extends FeatureTestCase ->assertSeeText('导出') ->assertSee('installation-details-table-wrap', false) ->assertSee('installation-details-table', false) + ->assertSee('writing-mode: horizontal-tb', false) + ->assertSee('text-overflow: ellipsis', false) ->assertSeeText('INSTALL-TEST-001') ->assertSeeText('测试安装公司') ->assertSeeText('120.50') -- 2.47.2