style(admin): scope row-warn styles for dashboard and keep platform orders guards

This commit is contained in:
萝卜
2026-03-16 14:22:16 +08:00
parent 51172e2664
commit ce26dd0454
5 changed files with 36 additions and 8 deletions

View File

@@ -26,7 +26,8 @@ class AdminPlatformOrderIndexRowWarnPrefixStyleScopedTest extends TestCase
$css = file_get_contents(public_path('css/admin-components.css'));
$this->assertIsString($css);
$this->assertStringContainsString('.platform-orders-table .row-warn-prefix{', $css);
// 允许同一套样式同时覆盖仪表盘最近订单(通过 [data-page="admin.dashboard"] 范围),但平台订单列表的 scope 仍必须存在。
$this->assertStringContainsString('.platform-orders-table .row-warn-prefix', $css);
// 避免全局污染
$this->assertStringNotContainsString("\n.row-warn-prefix{", $css);