TonyKang 3 years ago
parent
commit
3560f5c45b
1 changed files with 4 additions and 2 deletions
  1. 4 2
      app/public/report/js/rpt_print.js

+ 4 - 2
app/public/report/js/rpt_print.js

@@ -569,9 +569,11 @@ function buildText(destRst, cell, font, control, offsetX, offsetY, adjustY, canv
     }
 }
 
-function private_splitString(strVal, areaWidth, ctx) {
+function private_splitString(val, areaWidth, ctx) {
     let rst = [];
-    if (strVal) {
+    if (val) {
+        let strVal = val;
+        if (typeof val !== 'string') strVal = '' + strVal;
         let preSIdx = 0, txtWidth = 0;
         let currentW = 0;
         let chnW = ctx.measureText('一').width, otherW = ctx.measureText('_').width;