feat(PageContent): 支持后端文件导入

This commit is contained in:
cshaptx4869
2024-06-17 11:23:39 +08:00
parent 2854b36598
commit e2e70e647c
4 changed files with 53 additions and 16 deletions

View File

@@ -25,6 +25,9 @@ const contentConfig: IContentConfig<UserQuery> = {
return UserAPI.getPage(params);
},
deleteAction: UserAPI.deleteByIds,
importAction(file) {
return UserAPI.import(1, file);
},
exportAction: UserAPI.export,
importsTemplate: UserAPI.downloadTemplate,
importsAction(data) {
@@ -42,13 +45,8 @@ const contentConfig: IContentConfig<UserQuery> = {
toolbar: [
"add",
"delete",
"import",
"export",
{
name: "import",
icon: "upload",
text: "导入",
auth: "import",
},
{
name: "custom1",
icon: "plus",