React水印组件,支持图片水印,文字水印。
安装
npm i --save react-watermark-module
用法
import ReactWatermark from 'react-watermark-module'
const imagePath = require('imagePath.png')
const logoPath = require('logoPath.jpg')
文字水印
1、支持左上、左下、右上、右下、居中等位置
2、支持任意位置
3、多行文字(暂不支持)
简易API
imagePath={} //必须,对象,背景图片
textData={'红掌拨清波'} //必须,字符串,水印内容
type={'text'} //必须,水印类型
/>
所有API
ID={'watermark'} //非必须,字符串,id
color={'#f00'} //非必须,字符串,水印颜色
font={'28px serif'} //非必须,字符串,水印字号、字体
imagePath={} //必须,对象,背景图片
textData={'红掌拨清波'} //必须,字符串,水印内容
textPosi