mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 01:41:20 +08:00
15 lines
362 B
TypeScript
15 lines
362 B
TypeScript
export default function objectAssign(target, ...agrvs) {
|
|
for (let i = 0, j = agrvs.length; i < j; i++) {
|
|
const source = agrvs[i] || {}
|
|
for (const prop in source) {
|
|
if (source.hasOwnProperty(prop)) {
|
|
const value = source[prop]
|
|
if (value !== undefined) {
|
|
target[prop] = value
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return target
|
|
}
|