Merge pull request #137 from cshaptx4869/patch-93
refactor: ♻️ 修改CURD导出示例
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user