mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
16 lines
354 B
JavaScript
16 lines
354 B
JavaScript
export default function(target, ...sources) {
|
|
for (let i = 0; i < sources.length; i++) {
|
|
const source = sources[i] || {};
|
|
for (const prop in source) {
|
|
if (source.hasOwnProperty(prop)) {
|
|
const value = source[prop];
|
|
if (value !== undefined) {
|
|
target[prop] = value;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
return target;
|
|
};
|