✨ feat(武将): 重生体验优化 ca13e8be3 至 4ee246e78
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user