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: guide/animations.md
+12-1Lines changed: 12 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -193,13 +193,24 @@ You can also specify the enter and leave index for the `v-click` directive by pa
193
193
<div v-click.hide="[2, 4]">
194
194
This will be hidden at click 2 and 3.
195
195
</div>
196
-
197
196
<div v-click />
198
197
<div v-click="'[+1, +1]'">
199
198
This will be shown at click 3, and hidden since click 4.
200
199
</div>
201
200
```
202
201
202
+
You can also use `v-switch` to achieve the same effect:
203
+
204
+
```md
205
+
<v-switch>
206
+
<template #1> show at click 1, hide at click 2. </template>
207
+
<template #2> show at click 2, hide at click 5. </template>
208
+
<template #5-7> show at click 5, hide at click 7. </template>
209
+
</v-switch>
210
+
```
211
+
212
+
See [`VSwitch` Component](/builtin/components#vswitch) for more details.
213
+
203
214
### Custom Total Clicks Count
204
215
205
216
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