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
The `.native` modifier for `v-on`has been removed.
11
+
`v-on`の `.native` 修飾子は削除されました。
12
12
13
-
## 2.x Syntax
13
+
## 2.x での構文
14
14
15
-
Event listeners passed to a component with `v-on`are by default only triggered by emitting an event with `this.$emit`. To add a native DOM listener to the child component's root element instead, the `.native`modifier can be used:
15
+
`v-on`でコンポーネントに渡されたイベントリスナは、デフォルトでは `this.$emit` でイベントを発行することでのみ発火されます。代わりにネイティブ DOM リスナを子コンポーネントのルート要素に追加するには、 `.native`修飾子を使用できます:
16
16
17
17
```html
18
18
<my-component
@@ -21,11 +21,11 @@ Event listeners passed to a component with `v-on` are by default only triggered
21
21
/>
22
22
```
23
23
24
-
## 3.x Syntax
24
+
## 3.x での構文
25
25
26
-
The `.native` modifier for `v-on`has been removed. At the same time, the [new`emits`option](./emits-option.md)allows the child to define which events it does indeed emit.
Consequently, Vue will now add all event listeners that are _not_ defined as component-emitted events in the child as native event listeners to the child's root element (unless `inheritAttrs: false`has been set in the child's options).
0 commit comments