diff --git a/src/core/func/date.js b/src/core/func/date.js index e35e45cca..f629fb22a 100644 --- a/src/core/func/date.js +++ b/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); diff --git a/src/widget/intervalslider/intervalslider.js b/src/widget/intervalslider/intervalslider.js index ab8732ee2..ce07c7451 100644 --- a/src/widget/intervalslider/intervalslider.js +++ b/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));