replaceAll不行 我猜测是js的版本问题? let o=parseInt(oldVersion.replace(/\./g,"")) let n=parseInt(newVersion.replace(/\./g,"")) console.log("0",o) console.log("n",n) return n>o?true:false;