Browse Source

处理一下90.0这样的

es6
windy 7 years ago
parent
commit
78b775d5c1
  1. 17
      bi/widget.js
  2. 17
      dist/bundle.js
  3. 4
      dist/bundle.min.js
  4. 17
      dist/widget.js
  5. 17
      src/widget/intervalslider/intervalslider.js

17
bi/widget.js

@ -5911,12 +5911,17 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
_checkValidation: function (v) {
var o = this.options;
var valid = false;
if (BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max)) {
if(o.digit === false){
valid = true;
}else{
var dotText = (v + "").split(".")[1] || "";
valid = (dotText.length === o.digit);
//像90.这样的既不属于整数又不属于小数,是不合法的值
var dotText = (v + "").split(".")[1];
if (BI.isEmptyString(dotText)) {
}else{
if (BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max)) {
if(o.digit === false){
valid = true;
}else{
dotText = dotText || "";
valid = (dotText.length === o.digit);
}
}
}
return valid;

17
dist/bundle.js vendored

@ -81154,12 +81154,17 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
_checkValidation: function (v) {
var o = this.options;
var valid = false;
if (BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max)) {
if(o.digit === false){
valid = true;
}else{
var dotText = (v + "").split(".")[1] || "";
valid = (dotText.length === o.digit);
//像90.这样的既不属于整数又不属于小数,是不合法的值
var dotText = (v + "").split(".")[1];
if (BI.isEmptyString(dotText)) {
}else{
if (BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max)) {
if(o.digit === false){
valid = true;
}else{
dotText = dotText || "";
valid = (dotText.length === o.digit);
}
}
}
return valid;

4
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

17
dist/widget.js vendored

@ -5911,12 +5911,17 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
_checkValidation: function (v) {
var o = this.options;
var valid = false;
if (BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max)) {
if(o.digit === false){
valid = true;
}else{
var dotText = (v + "").split(".")[1] || "";
valid = (dotText.length === o.digit);
//像90.这样的既不属于整数又不属于小数,是不合法的值
var dotText = (v + "").split(".")[1];
if (BI.isEmptyString(dotText)) {
}else{
if (BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max)) {
if(o.digit === false){
valid = true;
}else{
dotText = dotText || "";
valid = (dotText.length === o.digit);
}
}
}
return valid;

17
src/widget/intervalslider/intervalslider.js

@ -295,12 +295,17 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
_checkValidation: function (v) {
var o = this.options;
var valid = false;
if (BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max)) {
if(o.digit === false){
valid = true;
}else{
var dotText = (v + "").split(".")[1] || "";
valid = (dotText.length === o.digit);
//像90.这样的既不属于整数又不属于小数,是不合法的值
var dotText = (v + "").split(".")[1];
if (BI.isEmptyString(dotText)) {
}else{
if (BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max)) {
if(o.digit === false){
valid = true;
}else{
dotText = dotText || "";
valid = (dotText.length === o.digit);
}
}
}
return valid;

Loading…
Cancel
Save