Skip to content

Commit 6635bcc

Browse files
committed
docs: translate migration guide > listeners removed
1 parent 00f1c74 commit 6635bcc

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
2-
title: $listeners removed
2+
title: $listeners の削除
33
badges:
44
- breaking
55
---
66

7-
# `$listeners` removed <MigrationBadges :badges="$frontmatter.badges" />
7+
# `$listeners` の削除 <MigrationBadges :badges="$frontmatter.badges" />
88

9-
## Overview
9+
## 概要
1010

11-
The `$listeners` object has been removed in Vue 3. Event listeners are now part of `$attrs`:
11+
`$listeners` オブジェクトは Vue 3 ですべて削除されました。イベントリスナは `$attrs` の一部になりました。
1212

1313
```javascript
1414
{
@@ -17,10 +17,10 @@ The `$listeners` object has been removed in Vue 3. Event listeners are now part
1717
}
1818
```
1919

20-
## 2.x Syntax
20+
## 2.x での構文
2121

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:
22+
Vue 2 では、コンポーネントに渡された属性は `this.$attrs` で、イベントリスナは `this.$listeners` でアクセスできます。
23+
`inheritAttrs: false` と組み合わせることで、開発者はこれらの属性やリスナを、ルート要素ではなく他の要素に適用することができます:
2424

2525
```html
2626
<template>
@@ -35,9 +35,9 @@ In combination with `inheritAttrs: false`, they allow the developer to apply the
3535
</script>
3636
```
3737

38-
## 3.x Syntax
38+
## 3.x での構文
3939

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` は削除されました。
4141

4242
```vue
4343
<template>
@@ -52,7 +52,7 @@ export default {
5252
</script>
5353
```
5454

55-
If this component received an `id` attribute and a `v-on:close` listener, the `$attrs` object will now look like this:
55+
もしこのコンポーネントが `id` 属性と `v-on:close` リスナを受け取った場合、 `$attrs` オブジェクトは次のようになります:
5656

5757
```javascript
5858
{
@@ -61,14 +61,14 @@ If this component received an `id` attribute and a `v-on:close` listener, the `$
6161
}
6262
```
6363

64-
## Migration Strategy
64+
## 移行の戦略
6565

66-
Remove all usages of `$listeners`.
66+
`$listeners` の使用をすべて削除します。
6767

68-
## See also
68+
## 参照
6969

70-
- [Relevant RFC](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0031-attr-fallthrough.md)
71-
- [Migration guide - `$attrs`includes `class` & `style` ](./attrs-includes-class-style.md)
72-
- [Migration guide - Changes in the Render Functions API](./render-function-api.md)
73-
- [Migration guide - New Emits Option](./emits-option.md)
74-
- [Migration guide - `.native` modifier removed](./v-on-native-modifier-removed.md)
70+
- [関連する RFC](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0031-attr-fallthrough.md)
71+
- [移行ガイド - `class` `style` を含む `$attrs`](./attrs-includes-class-style.md)
72+
- [移行ガイド - Render 関数 API](./render-function-api.md)
73+
- [移行ガイド - 新しい Emits のオプション](./emits-option.md)
74+
- [移行ガイド - `.native` 修飾子の削除](./v-on-native-modifier-removed.md)

0 commit comments

Comments
 (0)