unit单位初始化

This commit is contained in:
DESKTOP-H2PAFLR\Administrator
2023-08-07 18:02:42 +08:00
parent a9dbcf1b5b
commit cd27784ac9
10 changed files with 317 additions and 8 deletions

View File

@@ -231,4 +231,20 @@ export async function blobValidate(data) {
} catch (error) {
return true;
}
}
}
// 数据合并
export function mergeRecursive(source, target) {
for (var p in target) {
try {
if (target[p].constructor == Object) {
source[p] = mergeRecursive(source[p], target[p]);
} else {
source[p] = target[p];
}
} catch (e) {
source[p] = target[p];
}
}
return source;
};