fix(TableCell.js): 修复number类型数据在末位为的显示错误的bug

修复number类型数据在末位为0时显示错误的bug
This commit is contained in:
huayj 2019-08-26 21:23:09 +08:00
parent 963a9821ae
commit 094bf1661d
2 changed files with 2 additions and 2 deletions

View File

@ -129,7 +129,7 @@ var TableCell = function (_Component) {
nextSymbol = config.nextSymbol;
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(/\.$/, '');
}
var numberWidth = parseInt(width) - 16; // 减去默认的左右padding共计16px

View File

@ -1,6 +1,6 @@
{
"name": "bee-table",
"version": "2.2.2",
"version": "2.2.3",
"description": "Table ui component for react",
"keywords": [
"react",