fix(editor): 复制组件后添加组件id一直是之前复制的组件的id

This commit is contained in:
roymondchen 2022-06-03 21:25:32 +08:00 committed by jia000
parent ce5ac67b2d
commit 6eb1f2418a

View File

@ -98,10 +98,10 @@ class Props extends BaseService {
return value;
}
return cloneDeep({
return {
...getDefaultPropsValue(type),
...mergeWith(this.state.propsValueMap[type] || {}, defaultValue),
});
...mergeWith(cloneDeep(this.state.propsValueMap[type] || {}), cloneDeep(defaultValue)),
};
}
}