mirror of
https://github.com/element-plus/element-plus.git
synced 2024-12-27 03:01:14 +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
|
|
}
|