From 9944e7221f61c5e498ac78233bc59bae522d67a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Sat, 14 Mar 2026 13:41:10 +0000 Subject: [PATCH] admin-components: set platform-orders-table min-width per view (compact/full) --- public/css/admin-components.css | 9 +++++ ...entsCssPlatformOrdersTableMinWidthTest.php | 35 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 tests/Feature/AdminComponentsCssPlatformOrdersTableMinWidthTest.php diff --git a/public/css/admin-components.css b/public/css/admin-components.css index 0abace6..cf23a2b 100644 --- a/public/css/admin-components.css +++ b/public/css/admin-components.css @@ -85,6 +85,15 @@ min-width:1600px; } +/* 平台订单列表:根据视图控制 min-width(精简视图更紧凑,full 视图更宽) */ +.platform-orders-table.is-compact{ + min-width:1400px; +} + +.platform-orders-table.is-full{ + min-width:2000px; +} + .table-nowrap th, .table-nowrap td{ white-space:nowrap; diff --git a/tests/Feature/AdminComponentsCssPlatformOrdersTableMinWidthTest.php b/tests/Feature/AdminComponentsCssPlatformOrdersTableMinWidthTest.php new file mode 100644 index 0000000..b742563 --- /dev/null +++ b/tests/Feature/AdminComponentsCssPlatformOrdersTableMinWidthTest.php @@ -0,0 +1,35 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_admin_components_css_defines_min_width_for_compact_and_full_platform_orders_table(): void + { + $this->loginAsPlatformAdmin(); + + $css = file_get_contents(public_path('css/admin-components.css')); + $this->assertIsString($css); + + $this->assertStringContainsString('.platform-orders-table.is-compact{', $css); + $this->assertStringContainsString('min-width:1400px', $css); + + $this->assertStringContainsString('.platform-orders-table.is-full{', $css); + $this->assertStringContainsString('min-width:2000px', $css); + } +}