leo.xie 3 years ago
parent
commit
43a2cbd1de
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/views/list/pdf.vue

+ 3 - 0
src/views/list/pdf.vue

@@ -81,6 +81,9 @@
                 context.fillStyle = "#FFC82C"
                 // 设置右对齐
                 context.textAlign = 'right'
+                alert(watermark);
+                alert(canvas.width-20);
+                alert(canvas.height-20);
                 // 在指定位置绘制文字,这里指定距离右下角20坐标的地方
                 context.fillText(watermark, canvas.width - 20, canvas.height - 20)
                 let renderContext = {