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

fix(查询组件): 修复数字默认值报错
This commit is contained in:
dataeaseShu 2024-07-01 17:04:42 +08:00 committed by GitHub
commit 0441444f8e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -123,7 +123,13 @@ const getValueByDefaultValueCheckOrFirstLoad = (
}
if (firstLoad && !selectValue?.length) {
return defaultValueCheck ? defaultValue : multiple ? [] : ''
return defaultValueCheck
? Array.isArray(defaultValue)
? defaultValue
: [defaultValue]
: multiple
? []
: ''
}
return selectValue ? (Array.isArray(selectValue) ? selectValue : [selectValue]) : ''