本文主要是介绍vue后台管理添加水印简单方式watermark-package,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
详情参考: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()
}
这篇关于vue后台管理添加水印简单方式watermark-package的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!