Skip to content

Commit bd46a05

Browse files
committed
docs: update docs
1 parent be49557 commit bd46a05

1 file changed

Lines changed: 4 additions & 17 deletions

File tree

docs/zh/guide/watermark.md

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,6 @@ const app = getCurrentInstance();
2020
let childElementWatermark = null
2121

2222
onMounted(() => {
23-
// 富文本水印
24-
richTextWatermark = new Watermark({
25-
contentType: 'rich-text',
26-
content: '<div style="background: #ccc;">富文本水印 <span style="color: #f00">good</span></div>',
27-
width: 300,
28-
height: 300,
29-
filter: 'blur(2px)',
30-
movable: true,
31-
onSuccess: () => {
32-
app.appContext.config.globalProperties.$message({
33-
appendTo: '#app',
34-
message: '富文本水印添加成功!',
35-
type: 'success'
36-
});
37-
}
38-
});
3923
// 子元素水印
4024
childElementWatermark = new Watermark({
4125
parent: '.parent-element',
@@ -342,7 +326,10 @@ watermark.create() // 添加水印
342326

343327
watermark.destroy() // 删除水印
344328
```
345-
<div class="parent-element" style="width: 400px;height: 400px;border: 1px solid #333;margin-top: 10px;position: relative;">
329+
<div class="parent-element" style="border: 1px solid #333;width: 400px;height: 400px;margin-top: 10px;position: relative;overflow: hidden;">
330+
<div class="scroll-list" style="overflow: auto;width: 400px;height: 400px;">
331+
<div v-for="(item, index) in Array.from({length: 100})">{{index + 1}}</div>
332+
</div>
346333
</div>
347334
<el-affix target=".child-element-watermark" position="bottom" :offset="0" z-index="1000">
348335
<el-space class="block-operation">

0 commit comments

Comments
 (0)