diff --git a/openRenamerFront/src/App.vue b/openRenamerFront/src/App.vue index ac8f291..9b9b0d0 100644 --- a/openRenamerFront/src/App.vue +++ b/openRenamerFront/src/App.vue @@ -1,7 +1,6 @@ @@ -45,7 +46,7 @@ export default { version: "1.6.2", latestVersion: null, activeIndex: location.pathname, - showNewVersion: false + showNewVersion: false, }; }, async beforeCreate() { @@ -57,7 +58,6 @@ export default { let config = await httpUtil.get("https://s3.fleyx.com/picbed/openRenamer/config.json"); this.latestVersion = config.version; this.showNewVersion = checkVersion(this.version, this.latestVersion); - }, async mounted() { console.log(this.$route); @@ -66,8 +66,11 @@ export default { }; function checkVersion(version, latestVersion) { + if (version === latestVersion) { + return false; + } let versions = version.split("."); - let latestVersions = latestVersion.split('.'); + let latestVersions = latestVersion.split("."); for (let i = 0; i < versions.length; i++) { if (i >= latestVersions.length) { return false; @@ -78,7 +81,7 @@ function checkVersion(version, latestVersion) { return versionNum < latestVersionNum; } } - return false; + return true; }