You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
219 B
9 lines
219 B
// 从另一个对象中copy我有其key的值
|
|
export default function(obj, copyObj) {
|
|
Object.keys(obj).forEach(k => {
|
|
if (typeof copyObj[k] !== 'undefined') {
|
|
obj[k] = copyObj[k];
|
|
}
|
|
})
|
|
return obj;
|
|
}
|
|
|