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
@@ -17,10 +17,10 @@ The `$listeners` object has been removed in Vue 3. Event listeners are now part
17
17
}
18
18
```
19
19
20
-
## 2.x Syntax
20
+
## 2.x での構文
21
21
22
-
In Vue 2, you can access attributes passed to your components with `this.$attrs`, and event listeners with `this.$listeners`.
23
-
In combination with `inheritAttrs: false`, they allow the developer to apply these attributes and listeners to some other element instead of the root element:
@@ -35,9 +35,9 @@ In combination with `inheritAttrs: false`, they allow the developer to apply the
35
35
</script>
36
36
```
37
37
38
-
## 3.x Syntax
38
+
## 3.x での構文
39
39
40
-
In Vue 3's virtual DOM, event listeners are now just attributes, prefixed with `on`, and as such are part of the `$attrs`object, so `$listeners`has been removed.
40
+
Vue 3 の仮想 DOM では、イベントリスナはプレフィックスに `on` がついた単なる属性になり、 `$attrs`オブジェクトの一部であるため、 `$listeners`は削除されました。
41
41
42
42
```vue
43
43
<template>
@@ -52,7 +52,7 @@ export default {
52
52
</script>
53
53
```
54
54
55
-
If this component received an `id`attribute and a `v-on:close`listener, the `$attrs`object will now look like this:
0 commit comments