mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 02:48:55 +08:00
fix: 查询条件过滤空条件时, api query参数值的表达式执行结果为date类型时导致参数不生效 (#10325)
This commit is contained in:
parent
ccdedcef21
commit
906fa04b34
@ -144,7 +144,12 @@ export function buildApi(
|
||||
(api as ApiObject)?.filterEmptyQuery
|
||||
? {
|
||||
filter: (key: string, value: any) => {
|
||||
return value === '' ? undefined : value;
|
||||
return value === ''
|
||||
? undefined
|
||||
: // qs源码中有filter后,不会默认使用serializeDate处理date类型
|
||||
value instanceof Date
|
||||
? Date.prototype.toISOString.call(value)
|
||||
: value;
|
||||
}
|
||||
}
|
||||
: undefined
|
||||
|
Loading…
Reference in New Issue
Block a user