mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-05-12 13:59:32 +08:00
fix(editor): element-plus更新到2.6后表单项清除后是undefined,改回是空字符串
This commit is contained in:
parent
934398911d
commit
ceff0d4147
@ -535,13 +535,9 @@ class Editor extends BaseService {
|
|||||||
|
|
||||||
newConfig = mergeWith(cloneDeep(node), newConfig, (objValue, srcValue, key) => {
|
newConfig = mergeWith(cloneDeep(node), newConfig, (objValue, srcValue, key) => {
|
||||||
if (typeof srcValue === 'undefined' && Object.hasOwn(newConfig, key)) {
|
if (typeof srcValue === 'undefined' && Object.hasOwn(newConfig, key)) {
|
||||||
if (typeof objValue === 'string') {
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isObject(srcValue) && Array.isArray(objValue)) {
|
if (isObject(srcValue) && Array.isArray(objValue)) {
|
||||||
// 原来的配置是数组,新的配置是对象,则直接使用新的值
|
// 原来的配置是数组,新的配置是对象,则直接使用新的值
|
||||||
return srcValue;
|
return srcValue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user