Permalink
Browse files

fix: row-util

  • Loading branch information...
whizbz11 committed Jan 6, 2017
1 parent b3b74bc commit 4fba2755a18c479670af5384273119ac4d86ac5d
Showing with 2 additions and 1 deletion.
  1. +2 −1 js/dataTable/row-util.js
View
@@ -7,7 +7,8 @@ import {isNumber} from 'tinper-sparrow/js/util';
const eq = function (a, b) {
if ((a === null || a === undefined || a === '') && (b === null || b === undefined || b === '')) return true;
if (isNumber(a) && isNumber(b) && parseFloat(a) == parseFloat(b)) return true;
//判断输入的值是否相等,a,b是字符串直接比较这两个值即可,没必要判断是否是数据,判断是否是数据使用parseFloat转换有时精度不准(431027199110.078573)
//if (isNumber(a) && isNumber(b) && parseFloat(a) == parseFloat(b)) return true;
if (a + '' == b + '') return true;
return false;
}

0 comments on commit 4fba275

Please sign in to comment.