Browse Source

KERNEL-14215 fix:slider滑块左侧大于右侧无法交换的问题-bug42

es6
Vivy.Pan 2 years ago
parent
commit
0c4e697227
  1. 4
      src/widget/intervalslider/intervalslider.js

4
src/widget/intervalslider/intervalslider.js

@ -94,7 +94,7 @@ export class IntervalSlider extends Single {
); );
this.labelOne.on(Editor.EVENT_CONFIRM, () => { this.labelOne.on(Editor.EVENT_CONFIRM, () => {
const oldValueOne = this.valueOne; const oldValueOne = this.valueOne;
const v = parseFloat(this.getValue()); const v = parseFloat(this.labelOne.getValue());
this.valueOne = v; this.valueOne = v;
const percent = this._getPercentByValue(v); const percent = this._getPercentByValue(v);
const significantPercent = parseFloat(percent.toFixed(1)); // 分成1000份 const significantPercent = parseFloat(percent.toFixed(1)); // 分成1000份
@ -123,7 +123,7 @@ export class IntervalSlider extends Single {
); );
this.labelTwo.on(Editor.EVENT_CONFIRM, () => { this.labelTwo.on(Editor.EVENT_CONFIRM, () => {
const oldValueTwo = this.valueTwo; const oldValueTwo = this.valueTwo;
const v = parseFloat(this.getValue()); const v = parseFloat(this.labelTwo.getValue());
this.valueTwo = v; this.valueTwo = v;
const percent = this._getPercentByValue(v); const percent = this._getPercentByValue(v);
const significantPercent = parseFloat(percent.toFixed(1)); const significantPercent = parseFloat(percent.toFixed(1));

Loading…
Cancel
Save