@@ -3,28 +3,28 @@ badges:
33 - breaking
44---
55
6- # KeyCode Modifiers <MigrationBadges :badges =" $frontmatter.badges " />
6+ # キーコード修飾子 <MigrationBadges :badges =" $frontmatter.badges " />
77
8- ## Overview
8+ ## 概要
99
10- Here is a quick summary of what has changed:
10+ 変更点の概要は以下です
1111
12- - ** BREAKING ** : Using numbers, i.e. keyCodes, as ` v-on ` modifiers is no longer supported
13- - ** BREAKING ** : ` config.keyCodes ` is no longer supported
12+ - ** 破壊的変更 ** : ` v-on ` 修飾子にキーコードの数字を利用することはサポートされなくなりました
13+ - ** 破壊的変更 ** : ` config.keyCodes ` の利用はサポートされなくなりました
1414
15- ## 2.x Syntax
15+ ## 2.x での構文
1616
17- In Vue 2, ` keyCodes ` were supported as a way to modify a ` v-on ` method.
17+ Vue 2では、 ` v-on ` メソッドでキーコードを利用することができました。
1818
1919``` html
20- <!-- keyCode version -->
20+ <!-- キーコードを利用した場合 -->
2121<input v-on:keyup.13 =" submit" />
2222
23- <!-- alias version -->
23+ <!-- エイリアスを利用した場合 -->
2424<input v-on:keyup.enter =" submit" />
2525```
2626
27- In addition, you could define your own aliases via the global ` config.keyCodes ` option.
27+ さらに、 ` config.keyCodes ` のグローバルオプションを利用することで、独自のエイリアスを定義できました。
2828
2929``` js
3030Vue .config .keyCodes = {
@@ -33,24 +33,24 @@ Vue.config.keyCodes = {
3333```
3434
3535``` html
36- <!-- keyCode version -->
36+ <!-- キーコードを利用した場合 -->
3737<input v-on:keyup.112 =" showHelpText" />
3838
39- <!-- custom alias version -->
39+ <!-- 独自のエイリアスを利用した場合 -->
4040<input v-on:keyup.f1 =" showHelpText" />
4141```
4242
43- ## 3.x Syntax
43+ ## 3.x での構文
4444
45- Since [ ` KeyboardEvent.keyCode ` has been deprecated ] ( https://developer.mozilla.org/en-US /docs/Web/API/KeyboardEvent/keyCode ) , it no longer makes sense for Vue 3 to continue supporting this as well. As a result, it is now recommended to use the kebab-case name for any key you want to use as a modifier.
45+ [ ` KeyboardEvent.keyCode ` は非推奨 ] ( https://developer.mozilla.org/ja /docs/Web/API/KeyboardEvent/keyCode ) となり、 Vue 3においても引き続きサポートすることはもはや意味がありません。そのため、修飾子に利用したいキーのケバブケース名を利用することが推奨されます。
4646
4747``` html
48- <!-- Vue 3 Key Modifier on v-on -->
48+ <!-- Vue 3 の v-on でキー修飾子を利用する場合 -->
4949<input v-on:keyup.delete =" confirmDelete" />
5050```
5151
52- As a result, this means that ` config.keyCodes ` is now also deprecated and will no longer be supported.
52+ ` config.keyCodes ` の利用も同様の理由で非推奨となり、サポートされなくなりました。
5353
54- ## Migration Strategy
54+ ## 移行方法
5555
56- For those using ` keyCode ` in their codebase, we recommend converting them to their kebab-cased named equivalents.
56+ キーコードを利用している場合は、ケバブケースでの命名に変更することを推奨します。
0 commit comments