add beforeDeactivate and beforeActivate hook
#799
tbontb-iaq
started this conversation in
General
Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, we have
onMountedandonBeforeMountformount, and the same applies toupdateandunmount. However, foractivateanddeactivated, we only haveonActivatedandonDeactivated, lackingonBeforeActivateandonBeforeDeactivate.In vuejs/core#2349 (comment), I used
onDeactivatedto preserve the element's scroll position. However, by the time theonDeactivatedhook is triggered, the element has already been detached from the DOM, and itsscrollTopandscrollLeftare both 0.Beta Was this translation helpful? Give feedback.
All reactions