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
Copy file name to clipboardExpand all lines: docs/guide/animations.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -194,13 +194,24 @@ You can also specify the enter and leave index for the `v-click` directive by pa
194
194
<div v-click.hide="[2, 4]">
195
195
This will be hidden at click 2 and 3.
196
196
</div>
197
-
198
197
<div v-click />
199
198
<div v-click="'[+1, +1]'">
200
199
This will be shown at click 3, and hidden since click 4.
201
200
</div>
202
201
```
203
202
203
+
You can also use `v-switch` to achieve the same effect:
204
+
205
+
```md
206
+
<v-switch>
207
+
<template #1> show at click 1, hide at click 2. </template>
208
+
<template #2> show at click 2, hide at click 5. </template>
209
+
<template #5-7> show at click 5, hide at click 7. </template>
210
+
</v-switch>
211
+
```
212
+
213
+
See [`VSwitch` Component](/builtin/components#vswitch) for more details.
214
+
204
215
### Custom Total Clicks Count
205
216
206
217
By default, Slidev counts how many steps are needed before going to the next slide. You can override this setting by passing the `clicks` frontmatter option:
0 commit comments