From d72eec1a1b0d6a40b3734f6a1eb9cb4452527f32 Mon Sep 17 00:00:00 2001 From: GAOANG <1140589958@qq.com> Date: Wed, 3 Jul 2024 16:36:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=81=94=E6=83=B3=E5=BC=B9=E5=B1=82?= =?UTF-8?q?=EF=BC=8C=E5=8F=8D=E6=98=BE=E4=B8=8D=E7=BB=8F=E8=BF=87=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=8F=8A=E7=BF=BB=E9=A1=B5=E6=98=BE=E7=A4=BA=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../componentProperty/PropertyOption.vue | 11 +- src/components/Designer/src/types/index.ts | 2 + .../MultiplePopup/src/MultiplePopup.vue | 42 +- .../src/components/MultipleSelect.vue | 686 +++++++++--------- .../src/components/SimpleFormItem.vue | 3 +- src/utils/event/design.ts | 9 +- 6 files changed, 392 insertions(+), 361 deletions(-) diff --git a/src/components/Designer/src/components/componentProperty/PropertyOption.vue b/src/components/Designer/src/components/componentProperty/PropertyOption.vue index c595d1e..13de643 100644 --- a/src/components/Designer/src/components/componentProperty/PropertyOption.vue +++ b/src/components/Designer/src/components/componentProperty/PropertyOption.vue @@ -426,13 +426,18 @@ - diff --git a/src/utils/event/design.ts b/src/utils/event/design.ts index aa30fa4..f003d42 100644 --- a/src/utils/event/design.ts +++ b/src/utils/event/design.ts @@ -45,7 +45,7 @@ export function camelCaseString(string: string) { return str; } -export async function apiConfigFunc(apiConfig, isCustomForm = false, formModel?, index?) { +export async function apiConfigFunc(apiConfig, isCustomForm = false, formModel?, index?, paginationProps?, backPagination) { if (!apiConfig?.path) return []; const queryParam = {}; const headerParam = {}; @@ -57,6 +57,10 @@ export async function apiConfigFunc(apiConfig, isCustomForm = false, formModel?, for (const query of param.tableInfo) { queryParam[query.name] = apiConfig.input||getParamsValue(query, formModel, isCustomForm, index); } + if (backPagination) { + queryParam.limit = paginationProps.current + queryParam.size = paginationProps.pageSize + } } //header if (param.key === '2' && param.tableInfo && param.tableInfo.length) { @@ -79,6 +83,9 @@ export async function apiConfigFunc(apiConfig, isCustomForm = false, formModel?, body: bodyParam, query: queryParam, }); + if(paginationProps) { + paginationProps.total = res?.total || res?.length || 0 + } if (res && Array.isArray(res)) return res; //不分页接口 if (res && Array.isArray(res.list)) return res.list; //分页接口 return res;