File tree 1 file changed +16
-0
lines changed
packages/runtime-core/src
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -316,7 +316,11 @@ interface LegacyOptions<
316
316
updated ?( ) : void
317
317
activated ?( ) : void
318
318
deactivated ?( ) : void
319
+ /** @deprecated use `beforeUnmount` instead */
320
+ beforeDestroy ?( ) : void
319
321
beforeUnmount ?( ) : void
322
+ /** @deprecated use `unmounted` instead */
323
+ destroyed ?( ) : void
320
324
unmounted ?( ) : void
321
325
renderTracked ?: DebuggerHook
322
326
renderTriggered ?: DebuggerHook
@@ -393,7 +397,9 @@ export function applyOptions(
393
397
updated,
394
398
activated,
395
399
deactivated,
400
+ beforeDestroy,
396
401
beforeUnmount,
402
+ destroyed,
397
403
unmounted,
398
404
render,
399
405
renderTracked,
@@ -631,9 +637,19 @@ export function applyOptions(
631
637
if ( renderTriggered ) {
632
638
onRenderTriggered ( renderTriggered . bind ( publicThis ) )
633
639
}
640
+ if ( __DEV__ && beforeDestroy ) {
641
+ warn (
642
+ `\`beforeDestroy\` has been renamed to \`beforeUnmount\`.`
643
+ )
644
+ }
634
645
if ( beforeUnmount ) {
635
646
onBeforeUnmount ( beforeUnmount . bind ( publicThis ) )
636
647
}
648
+ if ( __DEV__ && destroyed ) {
649
+ warn (
650
+ `\`destroyed\` has been renamed to \`unmounted\`.`
651
+ )
652
+ }
637
653
if ( unmounted ) {
638
654
onUnmounted ( unmounted . bind ( publicThis ) )
639
655
}
You can’t perform that action at this time.
0 commit comments