-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
使用动态组件时,本地热更新被缓存组件会报异常parentComponent.ctx.deactivate is not a function #4387
Comments
This works fine in a vite and vue/cli project. The codesandbox template you used doesn't seem to be up to date or doesn't handle HMR correctly |
我的项目是vite构建的,在本地使用运行也一样会有这样的错误。 |
所以 你是怎么解决的呢?我也遇到这个问题了,key值这块儿好像没用,路由版本已经是最新的4.0了 |
I have fixed @danyadev's project: https://github.com/ygj6/vue3-bug/tree/bug-2 Hope it could help you. |
Version Steps to reproduce What is expected? What is actually happening? |
+1 |
Version
3.2.4
Reproduction link
https://codesandbox.io/s/525k8
Steps to reproduce
编辑keep-alive中的组件,保存使之热更新后会报错。
例如,编辑上方codesandbox中示例中components/tab1.vue后保存就会抛出异常
What is expected?
正常热更新,无错误信息
What is actually happening?
热更新时报错,导致热更新失败
The text was updated successfully, but these errors were encountered: