// 下载npm包
npm install watermark-package -S
使用
import watermark from "watermark-package"; // 添加水印 watermark.setWaterMark({ w_texts: [data.userName, data.account], w_options: { w_width: 240, w_height: 140, w_top: '0px', w_left: '0px', w_rotateDeg: 25, w_font: '1.2rem Vedana', w_color: '#666', w_opacity: '0.2', w_zIndex: '100000', } }) // 移除水印 // watermark.removeWatermark()标签:relevant,watermark,水印,utm,blog,125055703,全局,页面 From: https://www.cnblogs.com/Console-LIJIE/p/17358218.html