fix(查询组件): 修复数字默认值报错

This commit is contained in:
dataeaseShu 2024-07-01 17:04:04 +08:00
parent 37ae10328b
commit 5c24398bc9

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]) : ''