- 需要在网站中,全局背景中写入个人工号的水印,防止员工截图泄露公司数据
npm i watermark-simple
import { WM } from "watermark-simple";
//WM功能类似一个div,可以传入className,style,onClick等
<WM
text={"wangming"}
color={"#ebebeb"}
>
{props.children}
</WM>
- text(string):写入需要在当前dom中的水印文本
- fontSize(int):水印文字的大小(默认:16)
- color(string):水印文字的颜色色值(默认:"rgb(213,213,213)")
- height(int):单个水印的空间高度(默认:200)
- width(int): 单个水印的空间宽度(默认:300)
- rotate(int):旋转的角度(默认:1)