浏览代码

if value is 0 , it will print '0' not '-' (#3548)

RiggZh 8 年之前
父节点
当前提交
503aaae0e6
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/extensions/print/bootstrap-table-print.js

+ 1 - 1
src/extensions/print/bootstrap-table-print.js

@@ -65,7 +65,7 @@
                             return  column.printFormatter.apply(column, [value, row, i]);
                         }
                         else {
-                            return  value || "-";
+                            return  typeof value === 'undefined' ? "-" : value;
                         }
                     }