提交 | 用户 | age
|
2f6253
|
1 |
<template> |
31ff05
|
2 |
<PageWrapper title="水印示例"> |
4d7001
|
3 |
<CollapseContainer class="w-full h-32 bg-white rounded-md" title="Global WaterMark"> |
64b812
|
4 |
<a-button type="primary" class="mr-2" @click="setWatermark('WaterMark Info1')"> |
IW |
5 |
Create Watermark1 |
2f6253
|
6 |
</a-button> |
64b812
|
7 |
<a-button type="primary" class="mr-2" @click="setWatermark2('WaterMark Info2')"> |
IW |
8 |
Create Watermark2 |
|
9 |
</a-button> |
|
10 |
<a-button color="error" class="mr-2" @click="clear"> Clear Watermark1 </a-button> |
|
11 |
<a-button color="error" class="mr-2" @click="clearAll"> ClearAll </a-button> |
2f6253
|
12 |
<a-button color="warning" class="mr-2" @click="setWatermark('WaterMark Info New')"> |
64b812
|
13 |
Update Watermark1 |
2f6253
|
14 |
</a-button> |
陈 |
15 |
</CollapseContainer> |
31ff05
|
16 |
</PageWrapper> |
2f6253
|
17 |
</template> |
64b812
|
18 |
<script lang="ts" setup> |
IW |
19 |
import { onUnmounted } from 'vue'; |
2f6253
|
20 |
import { CollapseContainer } from '/@/components/Container/index'; |
陈 |
21 |
import { useWatermark } from '/@/hooks/web/useWatermark'; |
31ff05
|
22 |
import { PageWrapper } from '/@/components/Page'; |
2f6253
|
23 |
|
64b812
|
24 |
const { setWatermark, clear, clearAll } = useWatermark(); |
IW |
25 |
const { setWatermark: setWatermark2 } = useWatermark(); |
|
26 |
|
|
27 |
onUnmounted(() => { |
|
28 |
clearAll(); |
2f6253
|
29 |
}); |
陈 |
30 |
</script> |