fix(editor): element-plus更新到2.6后表单项清除后是undefined,改回是空字符串

This commit is contained in:
roymondchen 2024-03-26 17:15:42 +08:00
parent 934398911d
commit ceff0d4147

View File

@ -535,13 +535,9 @@ class Editor extends BaseService {
newConfig = mergeWith(cloneDeep(node), newConfig, (objValue, srcValue, key) => {
if (typeof srcValue === 'undefined' && Object.hasOwn(newConfig, key)) {
if (typeof objValue === 'string') {
return '';
}
return null;
}
if (isObject(srcValue) && Array.isArray(objValue)) {
// 原来的配置是数组,新的配置是对象,则直接使用新的值
return srcValue;