Browse Source

fix: 修复表格编辑时 Checkbox 组件无法正常取消勾选

pull/1758/head
zuihou 5 years ago
parent
commit
923ecdab3c
  1. 6
      src/components/Table/src/components/editable/EditableCell.vue

6
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;
}

Loading…
Cancel
Save