diff --git a/src/hooks/component/useFormItem.ts b/src/hooks/component/useFormItem.ts index 26d871f..8f9eeb9 100644 --- a/src/hooks/component/useFormItem.ts +++ b/src/hooks/component/useFormItem.ts @@ -31,8 +31,8 @@ export function useRuleFormItem(props: T, key: keyof T = ' const state: any = computed({ get() { - //修复多选时空值显示问题 - return !innerState.value || innerState.value === '' ? [] : innerState.value; + //修复多选时空值显示问题(兼容值为0的情况) + return innerState.value == null || innerState.value === '' ? [] : innerState.value; }, set(value) { if (isEqual(value, defaultState.value)) return;