@@ -11,7 +11,7 @@ Registers a callback to be called after the component has been mounted.
1111- ** Type**
1212
1313 ``` ts
14- function onMounted(callback : () => void ): void
14+ function onMounted(callback : () => void , target ? : ComponentInternalInstance | null ): void
1515 ```
1616
1717- ** Details **
@@ -53,7 +53,7 @@ Registers a callback to be called after the component has updated its DOM tree d
5353- ** Type **
5454
5555 ` ` ` ts
56- function onUpdated(callback: () => void): void
56+ function onUpdated(callback: () => void, target?: ComponentInternalInstance | null ): void
5757 ` ` `
5858
5959- ** Details **
@@ -96,7 +96,7 @@ Registers a callback to be called after the component has been unmounted.
9696- ** Type **
9797
9898 ` ` ` ts
99- function onUnmounted(callback: () => void): void
99+ function onUnmounted(callback: () => void, target?: ComponentInternalInstance | null ): void
100100 ` ` `
101101
102102- ** Details **
@@ -135,7 +135,7 @@ Registers a hook to be called right before the component is to be mounted.
135135- ** Type **
136136
137137 ` ` ` ts
138- function onBeforeMount(callback: () => void): void
138+ function onBeforeMount(callback: () => void, target?: ComponentInternalInstance | null ): void
139139 ` ` `
140140
141141- ** Details **
@@ -151,7 +151,7 @@ Registers a hook to be called right before the component is about to update its
151151- ** Type **
152152
153153 ` ` ` ts
154- function onBeforeUpdate(callback: () => void): void
154+ function onBeforeUpdate(callback: () => void, target?: ComponentInternalInstance | null ): void
155155 ` ` `
156156
157157- ** Details **
@@ -167,7 +167,7 @@ Registers a hook to be called right before a component instance is to be unmount
167167- ** Type **
168168
169169 ` ` ` ts
170- function onBeforeUnmount(callback: () => void): void
170+ function onBeforeUnmount(callback: () => void, target?: ComponentInternalInstance | null ): void
171171 ` ` `
172172
173173- ** Details **
@@ -282,7 +282,7 @@ Registers a callback to be called after the component instance is inserted into
282282- ** Type **
283283
284284 ` ` ` ts
285- function onActivated(callback: () => void): void
285+ function onActivated(callback: () => void, target?: ComponentInternalInstance | null ): void
286286 ` ` `
287287
288288- ** See also ** [Guide - Lifecycle of Cached Instance ](/ guide / built - ins / keep - alive #lifecycle - of - cached - instance )
@@ -296,7 +296,7 @@ Registers a callback to be called after the component instance is removed from t
296296- ** Type **
297297
298298 ` ` ` ts
299- function onDeactivated(callback: () => void): void
299+ function onDeactivated(callback: () => void, target?: ComponentInternalInstance | null ): void
300300 ` ` `
301301
302302- ** See also ** [Guide - Lifecycle of Cached Instance ](/ guide / built - ins / keep - alive #lifecycle - of - cached - instance )
0 commit comments