-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
fix(runtime-core): fix the issue of passing incorrect parentComponent to patch when KeepAlive is activated #13218
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
base: main
Are you sure you want to change the base?
Conversation
… to patch when KeepAlive is activated
Thanks for the PR, but the reproduction doesn't make sense. <KeepAlive>
<Test1 v-if=\"flag\" :key=\"key\" />
<Test2 v-else :key=\"key\" />
</KeepAlive> If the keys of if/else are different, there will be no issue. |
是的,这个例子是为了复现这个问题特意写的,实际情况下目前除了这样也几乎无法复现这个问题,但传给 patch 的 parentComponent 参数确实错了,主要是目前 patch 基本只在 mount 和 unmount 时使用到了 parentComponent,如果后续代码迭代中 patch 对传入的 parentComponent 有其它的使用方式就有可能会出现问题 |
Size ReportBundles
Usages
|
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
@vue/compat
vue
commit: |
/ecosystem-ci run |
📝 Ran ecosystem CI: Open
|
https://play.vuejs.org/#eNqdUk1PwzAM/SvGlw1prGJwGt3EhzgAEiDgmMvo3BGWJVXijqFp/x03paOgwYFT6ufnV/vZazwriv6yJBxiGjKvC4ZAXBZjZfWicJ5hDZ7yHkwp15YunICWLMMGcu8W0JHajrLKZs4GhtxMZjCqKrrsS9o/aRJzehdcobwKBW3wJwp8KJkf8t21slB30t2HGICocuktCDAaQydWdkQKYKPspvpVW3Twb9HBd9E0qX0RRyRgWhRmwiQRQPpcMjsLp5nR2Xyk8HP8vepVOGZRS5OaVBfcEBVnRi/regHq+ZcHOv8sVwhDMUmiaBUkbeZAmGQC7aKkSVs8TVqdYg85iDW5nvVfg7Oy7Di9wky80Yb8XcFarFM4bHxRODHGvV1HrNplr8GzF8rmO/DXsKowhfeeAvklKdzmeOJnxHX68vGWVvK9TS7ctDTC/iP5QMGZsuqxpp2Xdiptt3ix26t4strOnsLlismGZqiq0bjUyFcoV1udxW+jf7V71D9ujgE3HwcRC6A=