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;