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
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.
In Vue 3, the event name is prefixed with `vnode-`:
26
+
Vue 3 では、イベント名のプレフィックスに `vnode-` がついています:
27
27
28
28
```html
29
29
<template>
30
30
<child-component@vnode-updated="onUpdated">
31
31
</template>
32
32
```
33
33
34
-
Or just `vnode`if you're using camel case:
34
+
またはキャメルケースを使用している場合は、単に `vnode`となります:
35
35
36
36
```html
37
37
<template>
38
38
<child-component@vnodeUpdated="onUpdated">
39
39
</template>
40
40
```
41
41
42
-
## Migration Strategy
42
+
## 移行の戦略
43
43
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.
0 commit comments