Browse Source

空值格式化的处理

Karsa 1 year ago
parent
commit
60a9381100
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/views/datasheet_manage/common/customTable.js

+ 3 - 0
src/views/datasheet_manage/common/customTable.js

@@ -273,6 +273,9 @@ export function isNumberVal(value) {
 
 /* 增加减少小数点位数 */
 export function transDecimalPlace(str,{pn,nt}) {
+
+  if(!isNumberVal(str)) return '';
+
   let s = str.replace(/%/,''),
       decimalPlaces = getDecimalPlaces(str),
       decimalNum=pn;