Browse Source

Pull request #3058: KERNEL-12705 fix: bi.number_editor validationChecker 修复

Merge in VISUAL/fineui from ~DAILER/fineui:master to master

* commit '61e930420594ca21ecef347e013eca2f951ec378':
  KERNEL-12705 fix: bi.number_editor validationChecker 修复
es6
Dailer-刘荣歆 2 years ago
parent
commit
eb2143f003
  1. 5
      src/widget/numbereditor/number.editor.js

5
src/widget/numbereditor/number.editor.js

@ -33,10 +33,11 @@ BI.NumberEditor = BI.inherit(BI.Widget, {
value: o.valueFormatter(o.value), value: o.valueFormatter(o.value),
validationChecker: function (v) { validationChecker: function (v) {
// 不设置validationChecker就自动检测 // 不设置validationChecker就自动检测
if(o.validationChecker === BI.emptyFn && !self._checkValueInRange(v)) { var parsedValue = o.valueParser(v);
if (o.validationChecker === BI.emptyFn && !self._checkValueInRange(parsedValue)) {
return false; return false;
} }
return o.validationChecker(v); return o.validationChecker(parsedValue);
}, },
errorText: o.errorText errorText: o.errorText
}); });

Loading…
Cancel
Save