Fixed #967 - Decimal value for Slider step does not work
parent
f579ac54b7
commit
fd15103171
|
@ -83,10 +83,13 @@ export default {
|
|||
else if (diff > 0)
|
||||
newValue = oldValue + Math.floor(newValue / this.step - oldValue / this.step) * this.step;
|
||||
}
|
||||
else {
|
||||
newValue = Math.floor(newValue);
|
||||
}
|
||||
this.updateModel(event, newValue);
|
||||
},
|
||||
updateModel(event, value) {
|
||||
let newValue = value;
|
||||
let newValue = parseFloat(value.toFixed(10));
|
||||
let modelValue;
|
||||
|
||||
if (this.range) {
|
||||
|
@ -100,7 +103,7 @@ export default {
|
|||
else if (newValue >= maxValue)
|
||||
newValue = maxValue;
|
||||
|
||||
modelValue[0] = Math.floor(newValue);
|
||||
modelValue[0] = newValue;
|
||||
modelValue[1] = modelValue[1] || this.max;
|
||||
}
|
||||
else {
|
||||
|
@ -111,7 +114,7 @@ export default {
|
|||
newValue = minValue;
|
||||
|
||||
modelValue[0] = modelValue[0] || this.min;
|
||||
modelValue[1] = Math.floor(newValue);
|
||||
modelValue[1] = newValue;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue