Browse Source

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

Merge in VISUAL/fineui from ~VIVY.PAN/fineui:es6 to es6

* commit '5d8aa7ba0293a9daec8d7a5cad119bb47d200fcf':
  KERNEL-14215 fix:bi.year_interval组件下拉框无法显示-bug40
  KERNEL-14215 fix:slider滑块左侧大于右侧无法交换的问题-bug42
es6
Vivy.Pan-潘柯芋 2 years ago
parent
commit
ebadd68c89
  1. 7
      src/core/func/date.js
  2. 4
      src/widget/intervalslider/intervalslider.js

7
src/core/func/date.js

@ -1,5 +1,6 @@
/** Constants used for time computations */
import { getDate, getTime, parseInt, i18nText } from "../2.base";
import { getDate, getTime, parseInt } from "../2.base";
import { i18nText } from "../utils";
import { StartOfWeek } from "../constant";
import { isKhtml } from "../platform/web";
@ -343,7 +344,7 @@ export function print(date, str) {
s["%Q"] = qr;
let re = /%./g;
isKhtml = isKhtml || function () {
const isNewKhtml = isKhtml || function () {
if (!_global.navigator) {
return false;
}
@ -373,7 +374,7 @@ export function print(date, str) {
}
}
if (!isKhtml()) {
if (!isNewKhtml()) {
return str.replace(re, par => s[par] || par);
}
const a = str.match(re);

4
src/widget/intervalslider/intervalslider.js

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

Loading…
Cancel
Save