【修改】修改ziti

This commit is contained in:
zhoulingpo
2023-05-06 16:52:21 +08:00
parent d46756c71e
commit fdde20bb1c
+2 -1
View File
@@ -22,11 +22,12 @@ Vue.directive('watermark', {
can.style.display = 'none'
const cans = can.getContext('2d')
cans.rotate(-20 * Math.PI / 180)
cans.font = font || '13px Microsoft Yahei'
cans.font = font || '13px Helvetica Neue'
cans.fillStyle = textColor || 'rgba(100, 100, 100, 0.2)'
cans.textAlign = 'left'
cans.textBaseline = 'Middle'
cans.fillText(str, fillTextX, can.height)
console.log(cans)
// 设置背景图(整个项目中都添加水印建议使用此方法)
// parentNode.style.backgroundImage = "url(" + can.toDataURL("image/png") + ")";