feat(All):Initial

This commit is contained in:
2025-10-04 23:36:07 +08:00
commit 2b4e5d2668
1321 changed files with 415958 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
/**
* 将对象source的值深度遍历赋值给target对象相同key
* @param target
* @param source
*/
export function deepAssign(target, source) {
for (const key in source) {
if (source.hasOwnProperty(key)) {
if (typeof source[key] === 'object' && source[key] !== null && !Array.isArray(source[key])) {
if (!target[key]){
target[key] = {};
}
deepAssign(target[key], source[key]);
} else {
target[key] = source[key];
}
}
}
}