Object.assign将源对象(source)的所有可枚举属性,复制到目标对象(target)。

this.formInline =  Object.assign(this.formInline, data.obj.vendorPreOrder)
 
const target = { a: 1 };

const source1 = { b: 2 };
const source2 = { c: 3 };
Object.assign(target, source1, source2,{d:4}); target // {a:1, b:2, c:3,d:4}
原文地址:https://www.cnblogs.com/wssdx/p/12056071.html