From f23cc6c6fe3a27e515a16833f57206aeb870e8b3 Mon Sep 17 00:00:00 2001
From: cshaptx4869 <994774638@qq.com>
Date: Sat, 8 Jun 2024 13:56:09 +0800
Subject: [PATCH 1/2] =?UTF-8?q?refactor(PageContent):=20:recycle:=20?=
=?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=B7=A5=E5=85=B7=E6=A0=8F=E6=94=AF=E6=8C=81?=
=?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/PageContent/index.vue | 121 +++++++++++++++++----------
1 file changed, 77 insertions(+), 44 deletions(-)
diff --git a/src/components/PageContent/index.vue b/src/components/PageContent/index.vue
index 8db642bb..0dc13745 100644
--- a/src/components/PageContent/index.vue
+++ b/src/components/PageContent/index.vue
@@ -57,51 +57,73 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -447,7 +469,18 @@ export interface IContentConfig {
}
>;
// 表格工具栏右侧图标
- defaultToolbar?: ("refresh" | "filter" | "exports" | "search")[];
+ defaultToolbar?: Array<
+ | "refresh"
+ | "filter"
+ | "exports"
+ | "search"
+ | {
+ name: string;
+ icon: string;
+ title?: string;
+ auth?: string;
+ }
+ >;
// table组件列属性(额外的属性templet,operat,slotName)
cols: Array<{
type?: "default" | "selection" | "index" | "expand";
From 6c2542c78b06f8367264c54e3539c1851fcf1e64 Mon Sep 17 00:00:00 2001
From: cshaptx4869 <994774638@qq.com>
Date: Sat, 8 Jun 2024 17:06:18 +0800
Subject: [PATCH 2/2] =?UTF-8?q?refactor:=20:recycle:=20=E4=BF=AE=E6=94=B9C?=
=?UTF-8?q?URD=E5=AF=BC=E5=87=BA=E7=A4=BA=E4=BE=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/PageContent/index.vue | 2 +-
src/views/demo/curd/config/content.ts | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/components/PageContent/index.vue b/src/components/PageContent/index.vue
index 0dc13745..a79b9648 100644
--- a/src/components/PageContent/index.vue
+++ b/src/components/PageContent/index.vue
@@ -361,9 +361,9 @@
:disabled="selectionData.length <= 0"
/>
diff --git a/src/views/demo/curd/config/content.ts b/src/views/demo/curd/config/content.ts
index 6800f9c6..a1579ad0 100644
--- a/src/views/demo/curd/config/content.ts
+++ b/src/views/demo/curd/config/content.ts
@@ -26,6 +26,11 @@ const contentConfig: IContentConfig = {
},
deleteAction: UserAPI.deleteByIds,
exportAction: UserAPI.export,
+ exportsAction: async function (params) {
+ // 模拟获取全量数据
+ const res = await UserAPI.getPage(params);
+ return res.list;
+ },
pk: "id",
toolbar: [
"add",