File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -1433,6 +1433,7 @@ All lifecycle hooks automatically have their `this` context bound to the instanc
1433
1433
- ` .self ` - only trigger handler if event was dispatched from this element.
1434
1434
- ` .{keyCode | keyAlias} ` - only trigger handler on certain keys.
1435
1435
- ` .native ` - listen for a native event on the root element of component.
1436
+ - ` .once ` - trigger handler at most once.
1436
1437
1437
1438
- ** Usage:**
1438
1439
@@ -1471,6 +1472,9 @@ All lifecycle hooks automatically have their `this` context bound to the instanc
1471
1472
1472
1473
<!-- key modifier using keyCode -->
1473
1474
<input @keyup.13 =" onEnter" >
1475
+
1476
+ <!-- the click event will be triggered at most once -->
1477
+ <button v-on:click.once =" doThis" ></button >
1474
1478
```
1475
1479
1476
1480
Listening to custom events on a child component (the handler is called when "my-event" is emitted on the child):
You can’t perform that action at this time.
0 commit comments