Merge pull request #137 from cshaptx4869/patch-93
refactor: ♻️ 修改CURD导出示例
This commit is contained in:
@@ -361,9 +361,9 @@
|
|||||||
:disabled="selectionData.length <= 0"
|
:disabled="selectionData.length <= 0"
|
||||||
/>
|
/>
|
||||||
<el-option
|
<el-option
|
||||||
v-if="contentConfig.exportsAction"
|
|
||||||
label="全量数据 (包括所有分页的数据)"
|
label="全量数据 (包括所有分页的数据)"
|
||||||
:value="ExportsOriginEnum.REMOTE"
|
:value="ExportsOriginEnum.REMOTE"
|
||||||
|
:disabled="contentConfig.exportsAction === undefined"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|||||||
@@ -26,6 +26,11 @@ const contentConfig: IContentConfig<UserQuery> = {
|
|||||||
},
|
},
|
||||||
deleteAction: UserAPI.deleteByIds,
|
deleteAction: UserAPI.deleteByIds,
|
||||||
exportAction: UserAPI.export,
|
exportAction: UserAPI.export,
|
||||||
|
exportsAction: async function (params) {
|
||||||
|
// 模拟获取全量数据
|
||||||
|
const res = await UserAPI.getPage(params);
|
||||||
|
return res.list;
|
||||||
|
},
|
||||||
pk: "id",
|
pk: "id",
|
||||||
toolbar: [
|
toolbar: [
|
||||||
"add",
|
"add",
|
||||||
|
|||||||
Reference in New Issue
Block a user