fix: 修复版本比较bug

v2
xiaojunnuo 2025-09-28 12:49:53 +08:00
parent b86bbd370c
commit 109696e965
1 changed files with 3 additions and 1 deletions

View File

@ -177,6 +177,8 @@ function isNewVersion(version: string, latestVersion: string) {
for (let i = 0; i < current.length; i++) {
if (parseInt(latest[i]) > parseInt(current[i])) {
return true;
} else if (parseInt(latest[i]) < parseInt(current[i])) {
return false;
}
}
return false;
@ -191,7 +193,7 @@ async function loadLatestVersion() {
const minVersion = settingsStore.productInfo?.app?.minVersion;
if (minVersion) {
//
debugger;
if (isNewVersion(version.value, minVersion)) {
notification.error({
message: settingsStore.productInfo?.app?.minVersionTip ?? "版本过低,为了您的数据安全,请尽快升级",