-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
fix(Transition): handle KeepAlive child unmount in Transition out-in mode #11833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Size ReportBundles
Usages
|
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
@vue/reactivity
commit: |
Member
Author
|
/ecosystem-ci run |
Contributor
|
📝 Ran ecosystem CI: Open
|
edison1105
commented
Sep 6, 2024
|
|
||
| export function setTransitionHooks(vnode: VNode, hooks: TransitionHooks): void { | ||
| if (vnode.shapeFlag & ShapeFlags.COMPONENT && vnode.component) { | ||
| vnode.transition = hooks |
Member
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
close #11775
Problems in #11775
The out-in animation fails when switching from
pctopa.pbandpcwill be unmounted. It is expected that only theafterLeaveofpcwill be executed, but theafterLeaveofpbis also being executed, causingpato be rendered twice and resulting in the animation not working as expected. (TheafterLeaveofpbshould not be executed again)afterLeaveshould be destroyed after performed.pcwas removed frominclude, but it was not unmounted.currentis stillpcinpruneCacheEntry, so failed to unmountpc.currenttonullwhen patchingemptyPlaceholder.Problem in #10827
While fixing problem 2, I recalled a previous bug, #10827. At that time, it was determined that #10632 caused it, so #10632 was reverted, and the issues related to #10632 were re-fixed. Fixing problem 2 is equivalent to bringing #10632 back, so bug #10827 needs to be re-investigated.
Minimal reproduction
Steps to reproduce
switchToBbuttonswitchToAbuttonWhen switching from
CompBtoCompA, the content inCompAdisappears.afterLeavenot to perform.If the component is already mounted, inherit the transition fromwill cause [3.5.2] Transition stopped working aftercomponent.subTree.3116553#11829vnode.transitionduringsetTransitionHookstocomponent.subTreeThanks to @hooray for providing the reproduction