zuihou
2022-03-28 923ecdab3c611e84587d2890bc43031e9eaf99ff
fix: 修复表格编辑时 Checkbox 组件无法正常取消勾选
1个文件已修改
6 ■■■■■ 已修改文件
src/components/Table/src/components/editable/EditableCell.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Table/src/components/editable/EditableCell.vue
@@ -190,10 +190,12 @@
        const component = unref(getComponent);
        if (!e) {
          currentValueRef.value = e;
        } else if (e?.target && Reflect.has(e.target, 'value')) {
          currentValueRef.value = (e as ChangeEvent).target.value;
        } else if (component === 'Checkbox') {
          currentValueRef.value = (e as ChangeEvent).target.checked;
        } else if (component === 'Switch') {
          currentValueRef.value = e;
        } else if (e?.target && Reflect.has(e.target, 'value')) {
          currentValueRef.value = (e as ChangeEvent).target.value;
        } else if (isString(e) || isBoolean(e) || isNumber(e)) {
          currentValueRef.value = e;
        }