Browse Source

Merge pull request #250 in ~GUY/fineui from ~WINDY/fineui:BI4.1 to BI4.1

* commit '78b775d5c1e20a38c3a1aefbe41deb6c2fb67b72':
  处理一下90.0这样的
es6
windy 7 years ago
parent
commit
4deba2da0e
  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