浏览代码

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

invalid w 1 年之前
父节点
当前提交
71c43945a5
共有 1 个文件被更改,包括 1 次插入1 次删除
  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;