|
1
|
<template>
|
vben
authored
|
2
|
<PageWrapper title="水印示例">
|
vben
authored
|
3
|
<CollapseContainer class="w-full h-32 bg-white rounded-md" title="Global WaterMark">
|
|
4
5
6
|
<a-button type="primary" class="mr-2" @click="setWatermark('WaterMark Info')">
Create
</a-button>
|
vben
authored
|
7
|
<a-button color="error" class="mr-2" @click="clear"> Clear </a-button>
|
|
8
9
10
11
|
<a-button color="warning" class="mr-2" @click="setWatermark('WaterMark Info New')">
Reset
</a-button>
</CollapseContainer>
|
vben
authored
|
12
|
</PageWrapper>
|
|
13
14
15
16
17
|
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue';
import { CollapseContainer } from '/@/components/Container/index';
import { useWatermark } from '/@/hooks/web/useWatermark';
|
vben
authored
|
18
|
import { PageWrapper } from '/@/components/Page';
|
|
19
20
|
export default defineComponent({
|
vben
authored
|
21
|
components: { CollapseContainer, PageWrapper },
|
|
22
23
24
25
26
27
28
29
30
31
32
|
setup() {
const areaRef = ref<Nullable<HTMLElement>>(null);
const { setWatermark, clear } = useWatermark();
return {
setWatermark,
clear,
areaRef,
};
},
});
</script>
|