Browse Source

contentformat

es6
guy 6 years ago
parent
commit
40011a47ba
  1. 2
      dist/_fineui.min.js
  2. 11
      dist/bundle.js
  3. 2
      dist/bundle.min.js
  4. 11
      dist/core.js
  5. 11
      dist/fineui.js
  6. 2
      dist/fineui.min.js
  7. 11
      dist/utils.js
  8. 2
      dist/utils.min.js
  9. 11
      src/core/alias.js

2
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

11
dist/bundle.js vendored

@ -25698,6 +25698,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
text = +text;
return eFormat(text, fmt);
/**
* 科学计数格式具体计算过程
* @param num
@ -25717,7 +25718,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
var magnitude = Math[funcName](Math.log(num) / Math.log(10));
if (!isFinite(magnitude)) {
return format.replace(/#/ig, "").replace(/\.e/ig, 'E');
return format.replace(/#/ig, "").replace(/\.e/ig, "E");
}
num = num / Math.pow(10, magnitude);
@ -25742,7 +25743,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
num *= Math.pow(10, precision);
num = Math.round(num);
// 如果出现进位的情况,将num除以10
isValueCarry && (num /= 10, magnitude += magnitudeNeg === '-' ? -1 : 1);
isValueCarry && (num /= 10, magnitude += magnitudeNeg === "-" ? -1 : 1);
num /= Math.pow(10, precision);
// 小数部分保留precision位
@ -26269,11 +26270,11 @@ BI.ShowAction = BI.inherit(BI.Action, {
// 毫秒数类型
cv = new Date(cv);
} else {
// 字符串类型,如yyyyMMdd、MMddyyyy等这样无分隔符的结构
cv = BI.parseDateTime(cv + "", "Y-m-d H:i:s");
//字符串类型转化为date类型
cv = new Date(Date.parse(("" + cv).replace(/-|\./g, "/")));
}
}
if (!BI.isNull(cv)) {
if (!isInvalidDate(cv) && !BI.isNull(cv)) {
var needTrim = fmt.match(/^DT/);
text = BI.date2Str(cv, fmt.substring(needTrim ? 2 : 1));
}

2
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

11
dist/core.js vendored

@ -25698,6 +25698,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
text = +text;
return eFormat(text, fmt);
/**
* 科学计数格式具体计算过程
* @param num
@ -25717,7 +25718,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
var magnitude = Math[funcName](Math.log(num) / Math.log(10));
if (!isFinite(magnitude)) {
return format.replace(/#/ig, "").replace(/\.e/ig, 'E');
return format.replace(/#/ig, "").replace(/\.e/ig, "E");
}
num = num / Math.pow(10, magnitude);
@ -25742,7 +25743,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
num *= Math.pow(10, precision);
num = Math.round(num);
// 如果出现进位的情况,将num除以10
isValueCarry && (num /= 10, magnitude += magnitudeNeg === '-' ? -1 : 1);
isValueCarry && (num /= 10, magnitude += magnitudeNeg === "-" ? -1 : 1);
num /= Math.pow(10, precision);
// 小数部分保留precision位
@ -26269,11 +26270,11 @@ BI.ShowAction = BI.inherit(BI.Action, {
// 毫秒数类型
cv = new Date(cv);
} else {
// 字符串类型,如yyyyMMdd、MMddyyyy等这样无分隔符的结构
cv = BI.parseDateTime(cv + "", "Y-m-d H:i:s");
//字符串类型转化为date类型
cv = new Date(Date.parse(("" + cv).replace(/-|\./g, "/")));
}
}
if (!BI.isNull(cv)) {
if (!isInvalidDate(cv) && !BI.isNull(cv)) {
var needTrim = fmt.match(/^DT/);
text = BI.date2Str(cv, fmt.substring(needTrim ? 2 : 1));
}

11
dist/fineui.js vendored

@ -25947,6 +25947,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
text = +text;
return eFormat(text, fmt);
/**
* 科学计数格式具体计算过程
* @param num
@ -25966,7 +25967,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
var magnitude = Math[funcName](Math.log(num) / Math.log(10));
if (!isFinite(magnitude)) {
return format.replace(/#/ig, "").replace(/\.e/ig, 'E');
return format.replace(/#/ig, "").replace(/\.e/ig, "E");
}
num = num / Math.pow(10, magnitude);
@ -25991,7 +25992,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
num *= Math.pow(10, precision);
num = Math.round(num);
// 如果出现进位的情况,将num除以10
isValueCarry && (num /= 10, magnitude += magnitudeNeg === '-' ? -1 : 1);
isValueCarry && (num /= 10, magnitude += magnitudeNeg === "-" ? -1 : 1);
num /= Math.pow(10, precision);
// 小数部分保留precision位
@ -26518,11 +26519,11 @@ BI.ShowAction = BI.inherit(BI.Action, {
// 毫秒数类型
cv = new Date(cv);
} else {
// 字符串类型,如yyyyMMdd、MMddyyyy等这样无分隔符的结构
cv = BI.parseDateTime(cv + "", "Y-m-d H:i:s");
//字符串类型转化为date类型
cv = new Date(Date.parse(("" + cv).replace(/-|\./g, "/")));
}
}
if (!BI.isNull(cv)) {
if (!isInvalidDate(cv) && !BI.isNull(cv)) {
var needTrim = fmt.match(/^DT/);
text = BI.date2Str(cv, fmt.substring(needTrim ? 2 : 1));
}

2
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

11
dist/utils.js vendored

@ -12495,6 +12495,7 @@ _.extend(BI.OB.prototype, {
text = +text;
return eFormat(text, fmt);
/**
* 科学计数格式具体计算过程
* @param num
@ -12514,7 +12515,7 @@ _.extend(BI.OB.prototype, {
var magnitude = Math[funcName](Math.log(num) / Math.log(10));
if (!isFinite(magnitude)) {
return format.replace(/#/ig, "").replace(/\.e/ig, 'E');
return format.replace(/#/ig, "").replace(/\.e/ig, "E");
}
num = num / Math.pow(10, magnitude);
@ -12539,7 +12540,7 @@ _.extend(BI.OB.prototype, {
num *= Math.pow(10, precision);
num = Math.round(num);
// 如果出现进位的情况,将num除以10
isValueCarry && (num /= 10, magnitude += magnitudeNeg === '-' ? -1 : 1);
isValueCarry && (num /= 10, magnitude += magnitudeNeg === "-" ? -1 : 1);
num /= Math.pow(10, precision);
// 小数部分保留precision位
@ -13066,11 +13067,11 @@ _.extend(BI.OB.prototype, {
// 毫秒数类型
cv = new Date(cv);
} else {
// 字符串类型,如yyyyMMdd、MMddyyyy等这样无分隔符的结构
cv = BI.parseDateTime(cv + "", "Y-m-d H:i:s");
//字符串类型转化为date类型
cv = new Date(Date.parse(("" + cv).replace(/-|\./g, "/")));
}
}
if (!BI.isNull(cv)) {
if (!isInvalidDate(cv) && !BI.isNull(cv)) {
var needTrim = fmt.match(/^DT/);
text = BI.date2Str(cv, fmt.substring(needTrim ? 2 : 1));
}

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

11
src/core/alias.js

@ -23,6 +23,7 @@
text = +text;
return eFormat(text, fmt);
/**
* 科学计数格式具体计算过程
* @param num
@ -42,7 +43,7 @@
var magnitude = Math[funcName](Math.log(num) / Math.log(10));
if (!isFinite(magnitude)) {
return format.replace(/#/ig, "").replace(/\.e/ig, 'E');
return format.replace(/#/ig, "").replace(/\.e/ig, "E");
}
num = num / Math.pow(10, magnitude);
@ -67,7 +68,7 @@
num *= Math.pow(10, precision);
num = Math.round(num);
// 如果出现进位的情况,将num除以10
isValueCarry && (num /= 10, magnitude += magnitudeNeg === '-' ? -1 : 1);
isValueCarry && (num /= 10, magnitude += magnitudeNeg === "-" ? -1 : 1);
num /= Math.pow(10, precision);
// 小数部分保留precision位
@ -594,11 +595,11 @@
// 毫秒数类型
cv = new Date(cv);
} else {
// 字符串类型,如yyyyMMdd、MMddyyyy等这样无分隔符的结构
cv = BI.parseDateTime(cv + "", "Y-m-d H:i:s");
//字符串类型转化为date类型
cv = new Date(Date.parse(("" + cv).replace(/-|\./g, "/")));
}
}
if (!BI.isNull(cv)) {
if (!isInvalidDate(cv) && !BI.isNull(cv)) {
var needTrim = fmt.match(/^DT/);
text = BI.date2Str(cv, fmt.substring(needTrim ? 2 : 1));
}

Loading…
Cancel
Save