You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code snippet is retrieved from [playground](./playground/). You may also try the interactive playground [here](https://watermarkify.github.io/vue-watermark/).
33
33
34
34
```vue
35
35
<script setup lang="ts">
36
-
import { ref } from 'vue'
37
36
// step 1: import Watermark from @watermarkify/vue-watermark
38
37
import { Watermark } from '@watermarkify/vue-watermark'
39
38
40
39
// step 2: define watermark options
40
+
// see https://github.com/watermarkify/vue-watermark#options
41
41
const watermarkOptions = ref({
42
-
content: 'watermark'
42
+
content: 'watermark',
43
+
gap: [20, 20],
44
+
offset: [10, 10],
45
+
zIndex: 5,
46
+
rotate: -20,
43
47
})
44
48
</script>
49
+
```
50
+
51
+
Pass `watermarkOptions` to `options` and define your slot.
45
52
46
-
<template>
47
-
<div>
48
-
<h1>Watermark Example</h1>
49
-
<!-- step 3: apply watermark on the target slot -->
50
-
<Watermark :options="watermarkOptions">
51
-
<div class="content">This is the content of the slot.</div>
0 commit comments