Skip to content
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

fix(transition): v-show false should not call onEnter #4852

Closed
wants to merge 5 commits into from

Conversation

zhaozhongyu
Copy link

…directiveHooks
fix: #4845

@@ -617,6 +618,7 @@ function baseCreateRenderer(
}
}

// 首次渲染或v-if渲染, mounted回调
Copy link
Member

@edison1105 edison1105 Oct 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这些注释是没有必要的。大哥,就算注释也不能用中文啊。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不好意思, 习惯性加注释误提交了

Copy link
Member

@posva posva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test?

@posva posva changed the title fix(runtime-core): v-show transition hooks should be call via v-show … fix(transition): v-show false should not call onEnter Oct 25, 2021
@yyx990803 yyx990803 added this to Open for Review in Next Patch May 10, 2022
@yyx990803 yyx990803 closed this in 425310e May 11, 2022
@yyx990803
Copy link
Member

Thanks for the PR, but hard code checking _vod isn't the best way to do this. The renderer is already checking if the transition is in persisted mode, but I realized there was no compile-time logic to put v-show transitions in persisted mode. Fixed in 425310e which uses part of the tests in this PR.

@yyx990803 yyx990803 moved this from Open for Review to Done in Next Patch May 11, 2022
iwusong pushed a commit to iwusong/core that referenced this pull request May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

onEnter of transition component is fired when its child is set to v-show="false"
4 participants