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

runtime-core.esm-bundler.js:7318 Uncaught (in promise) TypeError: parentComponent.ctx.deactivate is not a function #1971

Closed
yiaokan opened this issue Sep 24, 2022 · 1 comment

Comments

@yiaokan
Copy link

yiaokan commented Sep 24, 2022

这个问题是出现在使用Suspense结合RouterVIew、KeepAlive时出现的情况。我发现官方文档中推荐的suspense和其他组件嵌套使用时的顺讯是错误的。地址:https://cn.vuejs.org/guide/built-ins/suspense.html#error-handling
官方文档的使用顺序是这样:
image

通过测试之后发现正确的顺序应该是这样:
image

@skirtles-code
Copy link
Contributor

I believe what's shown in the docs is correct. What you're seeing might be a core bug: vuejs/core#6222.

Putting the <KeepAlive> outside the <RouterView> might prevent the error message, but it won't actually be doing any keep-alive.

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

No branches or pull requests

2 participants