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/api/flashcards.md
+47Lines changed: 47 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -362,6 +362,28 @@ function blurTransform(position) {
362
362
-**Payload:**`item: T`
363
363
-**Description:** Emitted when a card is restored (returned to the stack via restore action).
364
364
365
+
### `loop`
366
+
367
+
-**Payload:** None
368
+
-**Description:** Emitted when a new loop cycle starts in loop mode. This event fires when all cards have been swiped and the component starts over from the beginning. Only triggered when `loop` prop is enabled.
369
+
370
+
### `dragstart`
371
+
372
+
-**Payload:**`item: T`
373
+
-**Description:** Emitted when user starts dragging a card. Fires immediately when dragging begins, before any movement threshold is reached.
-**Description:** Emitted during card dragging with real-time movement details. The `type` indicates the swipe direction (`'approve'` for right/up, `'reject'` for left/down, or `null` if within threshold). The `delta` is a normalized value (-1 to 1) representing drag progress relative to swipe threshold.
379
+
380
+
### `dragend`
381
+
382
+
-**Payload:**`item: T`
383
+
-**Description:** Emitted when user stops dragging a card, regardless of whether the swipe completed or was cancelled.
384
+
385
+
**Usage example with all events:**
386
+
365
387
```vue
366
388
<script setup>
367
389
function handleApprove(item) {
@@ -378,14 +400,39 @@ function handleRestore(item) {
0 commit comments