From 0cfb0101a3ee914060a4804b7b74adc0b35c6373 Mon Sep 17 00:00:00 2001 From: jingrow Date: Sun, 2 Nov 2025 15:14:42 +0800 Subject: [PATCH] =?UTF-8?q?pagetype=E5=88=97=E8=A1=A8=E9=A1=B5=E6=8B=86?= =?UTF-8?q?=E5=88=86=E8=BF=87=E6=BB=A4=E6=A0=8F=E5=92=8C=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=A0=8F=E4=B8=BA=E7=8B=AC=E7=AB=8B=E7=9A=84=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/core/pagetype/GenericListPage.vue | 109 ++++-------------- .../core/pagetype/GenericListPageActions.vue | 106 +++++++++++++++++ .../pagetype/GenericListPageFilterBar.vue | 38 ++++++ 3 files changed, 167 insertions(+), 86 deletions(-) create mode 100644 apps/jingrow/frontend/src/core/pagetype/GenericListPageActions.vue create mode 100644 apps/jingrow/frontend/src/core/pagetype/GenericListPageFilterBar.vue diff --git a/apps/jingrow/frontend/src/core/pagetype/GenericListPage.vue b/apps/jingrow/frontend/src/core/pagetype/GenericListPage.vue index 54c9914..d51f99e 100644 --- a/apps/jingrow/frontend/src/core/pagetype/GenericListPage.vue +++ b/apps/jingrow/frontend/src/core/pagetype/GenericListPage.vue @@ -57,10 +57,10 @@ }" /> - @@ -148,17 +148,15 @@ }" /> - + @@ -245,17 +243,15 @@ }" /> - + @@ -280,8 +276,9 @@ import { get_session_api_headers } from '@/shared/api/auth' import { usePageTypeSlug } from '@/shared/utils/slug' import { isSinglePageType } from '@/shared/utils/pagetype' import SinglePageDetail from './SinglePageDetail.vue' -import FilterBar from '@/core/components/FilterBar.vue' import GenericListPageToolBar from './GenericListPageToolBar.vue' +import GenericListPageFilterBar from './GenericListPageFilterBar.vue' +import GenericListPageActions from './GenericListPageActions.vue' import { resolvePagetypeListOverride, resolvePagetypeListToolbarOverride, @@ -1419,42 +1416,6 @@ function formatDisplayValue(value: any, fieldName: string) { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); } -.card-actions { - display: flex; - align-items: center; - justify-content: center; - gap: 6px; - padding: 12px 20px; - border-top: 1px solid #f3f4f6; - background: #fafbfc; - margin-top: auto; -} - -.action-btn { - width: 32px; - height: 32px; - border: none; - background: #f3f4f6; - color: #6b7280; - border-radius: 6px; - cursor: pointer; - display: flex; - align-items: center; - justify-content: center; - font-size: 13px; - transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); -} - -.action-btn:hover { - background: #3b82f6; - color: white; -} - -.action-btn.delete-btn:hover { - background: #ef4444; - color: white; -} - /* 工具栏容器样式(保留用于布局) */ .header-right { display: flex; align-items: center; gap: 12px; } @@ -1558,6 +1519,7 @@ function formatDisplayValue(value: any, fieldName: string) { font-size: 14px; } +/* 操作列容器样式(用于网格布局,按钮样式由 GenericListPageActions 组件处理) */ .col-actions { display: flex; align-items: center; @@ -1565,31 +1527,6 @@ function formatDisplayValue(value: any, fieldName: string) { gap: 4px; } -.action-btn { - width: 28px; - height: 28px; - border: none; - background: #f3f4f6; - color: #6b7280; - border-radius: 6px; - cursor: pointer; - display: flex; - align-items: center; - justify-content: center; - font-size: 12px; - transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); -} - -.action-btn:hover { - background: #3b82f6; - color: white; -} - -.action-btn.delete-btn:hover { - background: #ef4444; - color: white; -} - /* 布尔值样式 */ .boolean-true { color: #059669; diff --git a/apps/jingrow/frontend/src/core/pagetype/GenericListPageActions.vue b/apps/jingrow/frontend/src/core/pagetype/GenericListPageActions.vue new file mode 100644 index 0000000..5e1f153 --- /dev/null +++ b/apps/jingrow/frontend/src/core/pagetype/GenericListPageActions.vue @@ -0,0 +1,106 @@ + + + + + diff --git a/apps/jingrow/frontend/src/core/pagetype/GenericListPageFilterBar.vue b/apps/jingrow/frontend/src/core/pagetype/GenericListPageFilterBar.vue new file mode 100644 index 0000000..477c0e4 --- /dev/null +++ b/apps/jingrow/frontend/src/core/pagetype/GenericListPageFilterBar.vue @@ -0,0 +1,38 @@ + + + + +