Browse Source

Merge pull request #165894 in DEC/fineui from master to feature/x

* commit 'eb2143f003fb1673097c17228f34ed3eab73e11d':
  KERNEL-12705 fix: bi.number_editor validationChecker 修复
master
superman 2 years ago
parent
commit
79727dd962
  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),
validationChecker: function (v) {
// 不设置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 o.validationChecker(v);
return o.validationChecker(parsedValue);
},
errorText: o.errorText
});

Loading…
Cancel
Save