fix: 查询条件清空时,依旧会传递空值的请求参数
This commit is contained in:
parent
424bde5b16
commit
8770ef36a7
|
@ -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);
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
<div>
|
||||
<router-view v-slot="{ Component }">
|
||||
<template v-if="Component">
|
||||
<!-- <transition mode="out-in" :duration="100"> -->
|
||||
<transition mode="out-in" :duration="100">
|
||||
<Suspense>
|
||||
<component :is="Component" />
|
||||
<template #fallback>
|
||||
<a-skeleton />
|
||||
</template>
|
||||
</Suspense>
|
||||
<!-- </transition> -->
|
||||
</transition>
|
||||
</template>
|
||||
</router-view>
|
||||
</div>
|
||||
|
|
|
@ -91,6 +91,7 @@
|
|||
:name="Object.is(route.meta?.transitionName, false) ? '' : 'fade-transform'"
|
||||
mode="out-in"
|
||||
appear
|
||||
:duration="300"
|
||||
>
|
||||
<keep-alive :include="keepAliveComponents">
|
||||
<component :is="Component" :key="route.fullPath" />
|
||||
|
|
|
@ -58,6 +58,12 @@ export const baseColumns: TableColumnItem[] = [
|
|||
width: 120,
|
||||
dataIndex: 'email',
|
||||
},
|
||||
{
|
||||
title: 'QQ',
|
||||
width: 120,
|
||||
hideInSearch: true,
|
||||
dataIndex: 'qq',
|
||||
},
|
||||
{
|
||||
title: '手机',
|
||||
width: 120,
|
||||
|
|
Loading…
Reference in New Issue