const deepObjectMerge=(FirstOBJ: any, SecondOBJ: any)=>{ // 深度合并对象
for (var key in SecondOBJ) {
FirstOBJ[key] = FirstOBJ[key] && FirstOBJ[key].toString() === "[object Object]" ?
deepObjectMerge(FirstOBJ[key], SecondOBJ[key]) : FirstOBJ[key] = SecondOBJ[key];
}
return FirstOBJ;
}
export default deepObjectMerge;
网友评论