npm i vue-watermark-component
import watermark from 'vue-watermark-component'
<watermark :option='option'>
<div class="watermark1">
<p>000</p>
<p>000</p>
<p>000</p>
<p>000</p>
<p>000</p>
</div>
</watermark>
data() {
return {
option: {
width: 120,
height: 120,
text: '主标题',
subtext: '2024-03-11',
rotate: -45,
color:"rgba(0,0,0,0.3)",
textStyle: {
font:'18px SimHei',
},
subtextStyle: {
font:'12px SimHei',
}
},
}
},
.watermark1{
width: 1000px;
height: 800px;
border: 1px solid
margin: auto;
}
vue-watermark-component