Merge pull request #11278 from dataease/pr@dev-v2_st

fix(查询组件): 时间过滤规则设置默认值失败
This commit is contained in:
dataeaseShu 2024-07-31 09:27:45 +08:00 committed by GitHub
commit f27a22a99b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -135,7 +135,9 @@ const handleValueChange = () => {
})
return
}
config.value.defaultValue = value.map(ele => new Date(ele).toLocaleString())
config.value.defaultValue = Array.isArray(value)
? value.map(ele => new Date(ele).toLocaleString())
: new Date(value).toLocaleString()
}
const init = () => {