|
|
@@ -316,7 +316,11 @@ interface LegacyOptions<
|
|
|
updated?(): void
|
|
|
activated?(): void
|
|
|
deactivated?(): void
|
|
|
+ /** @deprecated use `beforeUnmount` instead */
|
|
|
+ beforeDestroy?(): void
|
|
|
beforeUnmount?(): void
|
|
|
+ /** @deprecated use `unmounted` instead */
|
|
|
+ destroyed?(): void
|
|
|
unmounted?(): void
|
|
|
renderTracked?: DebuggerHook
|
|
|
renderTriggered?: DebuggerHook
|
|
|
@@ -393,7 +397,9 @@ export function applyOptions(
|
|
|
updated,
|
|
|
activated,
|
|
|
deactivated,
|
|
|
+ beforeDestroy,
|
|
|
beforeUnmount,
|
|
|
+ destroyed,
|
|
|
unmounted,
|
|
|
render,
|
|
|
renderTracked,
|
|
|
@@ -631,9 +637,19 @@ export function applyOptions(
|
|
|
if (renderTriggered) {
|
|
|
onRenderTriggered(renderTriggered.bind(publicThis))
|
|
|
}
|
|
|
+ if (__DEV__ && beforeDestroy) {
|
|
|
+ warn(
|
|
|
+ `\`beforeDestroy\` has been renamed to \`beforeUnmount\`.`
|
|
|
+ )
|
|
|
+ }
|
|
|
if (beforeUnmount) {
|
|
|
onBeforeUnmount(beforeUnmount.bind(publicThis))
|
|
|
}
|
|
|
+ if (__DEV__ && destroyed) {
|
|
|
+ warn(
|
|
|
+ `\`destroyed\` has been renamed to \`unmounted\`.`
|
|
|
+ )
|
|
|
+ }
|
|
|
if (unmounted) {
|
|
|
onUnmounted(unmounted.bind(publicThis))
|
|
|
}
|