fix(TableCell.js): 修复number类型数据在末位为的显示错误的bug
修复number类型数据在末位为0时显示错误的bug
This commit is contained in:
parent
963a9821ae
commit
094bf1661d
|
@ -129,7 +129,7 @@ var TableCell = function (_Component) {
|
||||||
nextSymbol = config.nextSymbol;
|
nextSymbol = config.nextSymbol;
|
||||||
|
|
||||||
var number = (0, _utils.formatMoney)(data, precision, thousand);
|
var number = (0, _utils.formatMoney)(data, precision, thousand);
|
||||||
if (makeUp === false && number !== '0') {
|
if (makeUp === false && number !== '0' && number.indexOf('.') !== -1) {
|
||||||
number = number.replace(/0*$/, '').replace(/\.$/, '');
|
number = number.replace(/0*$/, '').replace(/\.$/, '');
|
||||||
}
|
}
|
||||||
var numberWidth = parseInt(width) - 16; // 减去默认的左右padding共计16px
|
var numberWidth = parseInt(width) - 16; // 减去默认的左右padding共计16px
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "bee-table",
|
"name": "bee-table",
|
||||||
"version": "2.2.2",
|
"version": "2.2.3",
|
||||||
"description": "Table ui component for react",
|
"description": "Table ui component for react",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"react",
|
"react",
|
||||||
|
|
Loading…
Reference in New Issue