From 19e7bbf7cb8816896640e46db23ed8410b9aa30c Mon Sep 17 00:00:00 2001 From: cshaptx4869 <994774638@qq.com> Date: Mon, 10 Jun 2024 12:20:44 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20:recycle:=20=E6=B7=BB=E5=8A=A0CURD?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/demo/curd/config/content.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/views/demo/curd/config/content.ts b/src/views/demo/curd/config/content.ts index a1579ad0..d259a1ee 100644 --- a/src/views/demo/curd/config/content.ts +++ b/src/views/demo/curd/config/content.ts @@ -26,9 +26,16 @@ const contentConfig: IContentConfig = { }, deleteAction: UserAPI.deleteByIds, exportAction: UserAPI.export, + importsTemplate: UserAPI.downloadTemplate, + importsAction(data) { + // 模拟导入数据 + console.log("importsAction", data); + return Promise.resolve(); + }, exportsAction: async function (params) { - // 模拟获取全量数据 + // 模拟获取到的是全量数据 const res = await UserAPI.getPage(params); + console.log("exportsAction", res.list); return res.list; }, pk: "id", @@ -43,6 +50,7 @@ const contentConfig: IContentConfig = { auth: "import", }, ], + defaultToolbar: ["refresh", "filter", "imports", "exports", "search"], cols: [ { type: "selection", width: 50, align: "center" }, { label: "编号", align: "center", prop: "id", width: 100, show: false },