Skip to content

Commit 8119bf8

Browse files
committed
docs: translate migrate guide > vnode lifecycle events
1 parent c43ab35 commit 8119bf8

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/guide/migration/vnode-lifecycle-events.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,46 +3,46 @@ badges:
33
- breaking
44
---
55

6-
# VNode Lifecycle Events <MigrationBadges :badges="$frontmatter.badges" />
6+
# VNode ライフサイクルイベント <MigrationBadges :badges="$frontmatter.badges" />
77

8-
## Overview
8+
## 概要
99

10-
In Vue 2, it was possible to use events to listen for key stages in a component's lifecycle. These events had names that started with the prefix `hook:`, followed by the name of the corresponding lifecycle hook.
10+
Vue 2 では、イベントを使ってコンポーネントのライフサイクルの重要なステージを監視することができました。これらのイベントは、プレフィックスの `hook:` からはじまり、その後にライフサイクルフックの名前がついていました。
1111

12-
In Vue 3, this prefix has been changed to `vnode-`. In addition, these events are now available for HTML elements as well as components.
12+
Vue 3 では、このプレフィックスが `vnode-` に変更されました。また、これらのイベントは、コンポーネントとしてだけでなく HTML 要素でも利用できるようになりました。
1313

14-
## 2.x Syntax
14+
## 2.x での構文
1515

16-
In Vue 2, the event name is the same as the equivalent lifecycle hook, prefixed with `hook:`:
16+
Vue 2 では、イベント名は同等のライフサイクルフックと同じで、プレフィックスに `hook:` がついています:
1717

1818
```html
1919
<template>
2020
<child-component @hook:updated="onUpdated">
2121
</template>
2222
```
2323

24-
## 3.x Syntax
24+
## 3.x での構文
2525

26-
In Vue 3, the event name is prefixed with `vnode-`:
26+
Vue 3 では、イベント名のプレフィックスに `vnode-` がついています:
2727

2828
```html
2929
<template>
3030
<child-component @vnode-updated="onUpdated">
3131
</template>
3232
```
3333

34-
Or just `vnode` if you're using camel case:
34+
またはキャメルケースを使用している場合は、単に `vnode` となります:
3535

3636
```html
3737
<template>
3838
<child-component @vnodeUpdated="onUpdated">
3939
</template>
4040
```
4141

42-
## Migration Strategy
42+
## 移行の戦略
4343

44-
In most cases it should just require changing the prefix. The lifecycle hooks `beforeDestroy` and `destroyed` have been renamed to `beforeUnmount` and `unmounted` respectively, so the corresponding event names will also need to be updated.
44+
ほとんどの場合、プレフィックスの変更だけで済みます。ライフサイクルフックの `beforeDestroy` `destroyed` は、それぞれ `beforeUnmount` `unmounted` に名前が変更され、対応するイベント名も更新する必要があります。
4545

46-
## See also
46+
## 参照
4747

48-
- [Migration guide - Events API](/guide/migration/events-api.html)
48+
- [移行ガイド - イベント API](/guide/migration/events-api.html)

0 commit comments

Comments
 (0)