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); + } +}