feat(武将): 重生体验优化 ca13e8be3 至 4ee246e78

This commit is contained in:
luying
2023-08-29 16:29:19 +08:00
parent 878d80f069
commit 820bfe170a
8 changed files with 155 additions and 9 deletions

View File

@@ -881,4 +881,13 @@ export function compareVersion(versionA: string, versionB: string) {
} else {
return 0;
}
};
};
// 交换俩obj中的指定字段
export function swapFields(originObj: object, targetObj: object, fieldsToSwap: string[]) {
for (const field of fieldsToSwap) {
const temp = originObj[field];
originObj[field] = targetObj[field];
targetObj[field] = temp;
}
}