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