From 6cb53435b103698046d9642795407a8ce27590e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Mon, 16 Mar 2026 01:13:32 +0800 Subject: [PATCH] chore(admin-ui): introduce list-card component and apply to subscriptions index --- public/css/admin-components.css | 35 +++++++++++++++++++ .../admin/site_subscriptions/index.blade.php | 12 +++++-- ...onsIndexShouldUseListCardStructureTest.php | 35 +++++++++++++++++++ 3 files changed, 79 insertions(+), 3 deletions(-) create mode 100644 tests/Feature/AdminSiteSubscriptionsIndexShouldUseListCardStructureTest.php diff --git a/public/css/admin-components.css b/public/css/admin-components.css index 01957e4..97ccdd2 100644 --- a/public/css/admin-components.css +++ b/public/css/admin-components.css @@ -128,6 +128,41 @@ margin:0; } +/* 可复用:List Card(列表页统一卡片:标题区/操作区/表格区) */ +.list-card{ + padding:0; +} + +.list-card-header{ + padding:14px 16px; + display:flex; + align-items:flex-start; + justify-content:space-between; + gap:12px; +} + +.list-card-title{ + margin:0; +} + +.list-card-subtitle{ + margin-top:6px; +} + +.list-card-body{ + border-top:1px solid var(--adm-border-color, #e5e7eb); + padding:0; +} + +.list-card-table{ + margin:0; +} + +.list-card-table th, +.list-card-table td{ + padding:12px 12px; +} + /* 可复用:PageHeader(参考 Ant Design Pro:标题区 + 描述 + 右侧操作区) */ .page-header{ width:100%; diff --git a/resources/views/admin/site_subscriptions/index.blade.php b/resources/views/admin/site_subscriptions/index.blade.php index 665ceda..3bccd02 100644 --- a/resources/views/admin/site_subscriptions/index.blade.php +++ b/resources/views/admin/site_subscriptions/index.blade.php @@ -265,9 +265,14 @@ -
-

订阅列表

- +
+
+
+

订阅列表

+
+
+
+
@@ -406,6 +411,7 @@ @endforelse
ID
+
{{ $subscriptions->links() }}
diff --git a/tests/Feature/AdminSiteSubscriptionsIndexShouldUseListCardStructureTest.php b/tests/Feature/AdminSiteSubscriptionsIndexShouldUseListCardStructureTest.php new file mode 100644 index 0000000..4593848 --- /dev/null +++ b/tests/Feature/AdminSiteSubscriptionsIndexShouldUseListCardStructureTest.php @@ -0,0 +1,35 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_admin_site_subscriptions_index_should_use_list_card_structure(): void + { + $this->loginAsPlatformAdmin(); + + $response = $this->get('/admin/site-subscriptions'); + $response->assertOk(); + + // 护栏:订阅列表区域应使用统一 List Card 结构,便于全站列表页风格统一。 + $response->assertSee('list-card', false); + $response->assertSee('list-card-header', false); + $response->assertSee('list-card-body', false); + $response->assertSee('list-card-table', false); + } +}