[Improvement] optimize babel plugin (#1117)

This commit is contained in:
neverland
2018-05-20 20:40:33 +08:00
committed by GitHub
parent b5139b18eb
commit e95107f14c
2 changed files with 22 additions and 6 deletions

View File

@@ -90,7 +90,7 @@ export default create({
methods: {
correctValue(value) {
return Number.isNaN(value)
return isNaN(value)
? this.min
: Math.max(this.min, Math.min(this.max, value));
},