详情参考:https://www.npmjs.com/package/watermark-package
示例方法
<el-button type="primary" @click="AddWatermark">添加水印</el-button>
<el-button type="primary" @click="RemoveWatermark">清除水印</el-button>
const AddWatermark = () => {
watermark.setWaterMark({
w_texts: ['娃哈哈', '177****0000'],
w_options: {
w_width: 240,
w_height: 140,
w_top: '0px',
w_left: '0px',
w_rotateDeg: 25,
w_font: '1.2rem Vedana',
w_color: 'red',
w_opacity: '0.2',
w_zIndex: '100000'
}
})
}
const RemoveWatermark = () => {
watermark.removeWatermark()
}