From 8770ef36a72c752578431ae0b24570681e6f2a62 Mon Sep 17 00:00:00 2001 From: louis <869322496@qq.com> Date: Wed, 28 Feb 2024 15:04:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E6=B8=85=E7=A9=BA=E6=97=B6=EF=BC=8C=E4=BE=9D=E6=97=A7=E4=BC=9A?= =?UTF-8?q?=E4=BC=A0=E9=80=92=E7=A9=BA=E5=80=BC=E7=9A=84=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dynamic-table/src/hooks/useTableMethods.ts | 6 ++++++ src/layout/routerView/index.vue | 16 ++++++++-------- src/layout/tabs/tabs-view.vue | 1 + src/views/system/user/columns.tsx | 6 ++++++ 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/src/components/core/dynamic-table/src/hooks/useTableMethods.ts b/src/components/core/dynamic-table/src/hooks/useTableMethods.ts index 4ea8017..a74673a 100644 --- a/src/components/core/dynamic-table/src/hooks/useTableMethods.ts +++ b/src/components/core/dynamic-table/src/hooks/useTableMethods.ts @@ -99,9 +99,15 @@ export const useTableMethods = ({ state, props, emit }: UseTableMethodsContext) ...queryFormRef.value.handleFormValues(values), ...queryParams, }; + for (const key in queryParams) { + if (queryParams[key] !== 0 && !queryParams[key]) { + delete queryParams[key]; + } + } } loadingRef.value = true; + const res = await dataRequest(queryParams); const isArrayResult = Array.isArray(res); diff --git a/src/layout/routerView/index.vue b/src/layout/routerView/index.vue index 5acaf80..b1e9eeb 100644 --- a/src/layout/routerView/index.vue +++ b/src/layout/routerView/index.vue @@ -2,14 +2,14 @@