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(runtime-dom): use KeepAlive and CustomElement at same time(#6934) #6966

Merged
merged 3 commits into from
Nov 11, 2022

Conversation

ysy945
Copy link
Contributor

@ysy945 ysy945 commented Oct 27, 2022

if you use KeepAlive and CustomElement.CustomElement will not recreate.so the property of "_resolved" would be "true",it means that should update it

Copy link
Contributor Author

@ysy945 ysy945 left a comment

Choose a reason for hiding this comment

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

update

Copy link

@tuchg tuchg left a comment

Choose a reason for hiding this comment

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

it always to trigger a unmounted hook. I think this shadowDom should be cached rather than rebuilt.

@ysy945
Copy link
Contributor Author

ysy945 commented Oct 27, 2022

could you give me a example in playground?

@tuchg
Copy link

tuchg commented Oct 27, 2022

could you give me a example in playground?

here

@ysy945
Copy link
Contributor Author

ysy945 commented Oct 27, 2022

this link is http://localhost:5173. if you want to show your problem online,may click here

@tuchg
Copy link

tuchg commented Oct 27, 2022

this link is http://localhost:5173. if you want to show your problem online,may click here

You just need to replace the domain part,localhost:5173 to sfc.vuejs.org, this effect isn't available in online version

@ysy945
Copy link
Contributor Author

ysy945 commented Oct 27, 2022

I know your means. I think maybe that author didn't think about this situation that use customElement in KeepAlive.

@ysy945
Copy link
Contributor Author

ysy945 commented Oct 27, 2022

for KeepAlive,it should be moved instead of unmount.but in customElements,it can only be unmount

@ysy945
Copy link
Contributor Author

ysy945 commented Oct 27, 2022

this link is http://localhost:5173. if you want to show your problem online,may click here

You just need to replace the domain part,localhost:5173 to sfc.vuejs.org, this effect isn't available in online version

I suggest that do not use customElement in KeepAlive

@ysy945
Copy link
Contributor Author

ysy945 commented Oct 27, 2022

this link is http://localhost:5173. if you want to show your problem online,may click here

I will try to make it possible. but it is difficult to merge by member. so you'd better stop to use like this or wait for next version

@yyx990803 yyx990803 merged commit 67890da into vuejs:main Nov 11, 2022
yyx990803 added a commit that referenced this pull request Nov 11, 2022
chrislone pushed a commit to chrislone/core that referenced this pull request Feb 4, 2023
chrislone pushed a commit to chrislone/core that referenced this pull request Feb 4, 2023
zhangzhonghe pushed a commit to zhangzhonghe/core that referenced this pull request Apr 12, 2023
zhangzhonghe pushed a commit to zhangzhonghe/core that referenced this pull request Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom element render empty when recovered from KeepAlive
3 participants