Skip to content

Commit 7fdae68

Browse files
committed
add html code type
1 parent 727592e commit 7fdae68

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/guide/events.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ When you want to access the original DOM event in an expression handler, you can
7676

7777
When listening for keyboard events, we often need to check for common key codes. Vue.js provides a special `key` filter that can only be used with `v-on` directives. It takes a single argument that denotes the key code to check for:
7878

79-
```
79+
``` html
8080
<!-- only call vm.submit() when the keyCode is 13 -->
8181
<input v-on="keyup:submit | key 13">
8282
```
8383

8484
It also has a few presets for commonly used keys:
8585

86-
```
86+
``` html
8787
<!-- same as above -->
8888
<input v-on="keyup:submit | key 'enter'">
8989
```

0 commit comments

Comments
 (0)