Explorar el Código

fix(EditCellTable): 表格编辑行在使用Switch,checkedValue为数字时无法切换开关.close #2560

invalid w hace 1 año
padre
commit
71c43945a5
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/components/Table/src/components/editable/EditableCell.vue

+ 1 - 1
src/components/Table/src/components/editable/EditableCell.vue

@@ -70,7 +70,7 @@
         const valueField = isCheckValue ? 'checked' : 'value';
         const val = unref(currentValueRef);
 
-        const value = isCheckValue ? (isNumber(val) && isBoolean(val) ? val : !!val) : val;
+        const value = isCheckValue ? (isNumber(val) || isBoolean(val) ? val : !!val) : val;
 
         let compProps = props.column?.editComponentProps ?? ({} as any);
         const { record, column, index } = props;