mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[Improvement] optimize babel plugin (#1117)
This commit is contained in:
parent
b5139b18eb
commit
e95107f14c
26
.babelrc
26
.babelrc
@ -1,14 +1,30 @@
|
||||
{
|
||||
"presets": [["env", { "modules": false, "loose": true }]],
|
||||
"presets": [
|
||||
[
|
||||
"env",
|
||||
{
|
||||
"modules": false,
|
||||
"loose": true,
|
||||
"exclude": ["transform-es2015-typeof-symbol"]
|
||||
}
|
||||
]
|
||||
],
|
||||
"plugins": ["transform-runtime", "transform-object-rest-spread"],
|
||||
"env": {
|
||||
"commonjs": {
|
||||
"presets": [["env", { "modules": "commonjs", "loose": true }]]
|
||||
"presets": [
|
||||
[
|
||||
"env",
|
||||
{
|
||||
"modules": "commonjs",
|
||||
"loose": true,
|
||||
"exclude": ["transform-es2015-typeof-symbol"]
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"test": {
|
||||
"presets": [
|
||||
["env", { "targets": { "node": 8 }}]
|
||||
]
|
||||
"presets": [["env", { "targets": { "node": 8 } }]]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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));
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user