Merge pull request #137 from cshaptx4869/patch-93

refactor: ♻️ 修改CURD导出示例
This commit is contained in:
Ray Hao
2024-06-08 17:10:05 +08:00
committed by GitHub
2 changed files with 6 additions and 1 deletions

View File

@@ -361,9 +361,9 @@
:disabled="selectionData.length <= 0"
/>
<el-option
v-if="contentConfig.exportsAction"
label="全量数据 (包括所有分页的数据)"
:value="ExportsOriginEnum.REMOTE"
:disabled="contentConfig.exportsAction === undefined"
/>
</el-select>
</el-form-item>

View File

@@ -26,6 +26,11 @@ const contentConfig: IContentConfig<UserQuery> = {
},
deleteAction: UserAPI.deleteByIds,
exportAction: UserAPI.export,
exportsAction: async function (params) {
// 模拟获取全量数据
const res = await UserAPI.getPage(params);
return res.list;
},
pk: "id",
toolbar: [
"add",