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

TypeError: parentComponent.ctx.deactivate is not a function #27

Closed
midfar opened this issue Sep 7, 2022 · 2 comments
Closed

TypeError: parentComponent.ctx.deactivate is not a function #27

midfar opened this issue Sep 7, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@midfar
Copy link

midfar commented Sep 7, 2022

  1. 从master分支拉代码
  2. 修改 src/router/routes.ts 第14行,在meta中新增keepAlive属性,代码如下:
    meta: { menu: { title: "router.dashboard" }, keepAlive: true }
  3. npm run dev
  4. 进入首页后,修改文件 src/views/HomePage.vue 第8行新增如下代码
    console.log('HomePage init')
  5. 触发热更新后,控制台报错:
    Uncaught (in promise) TypeError: parentComponent.ctx.deactivate is not a function
@cloudhao1999
Copy link
Owner

cloudhao1999 commented Sep 7, 2022

  1. 从master分支拉代码
  2. 修改 src/router/routes.ts 第14行,在meta中新增keepAlive属性,代码如下:
    meta: { menu: { title: "router.dashboard" }, keepAlive: true }
  3. npm run dev
  4. 进入首页后,修改文件 src/views/HomePage.vue 第8行新增如下代码
    console.log('HomePage init')
  5. 触发热更新后,控制台报错:
    Uncaught (in promise) TypeError: parentComponent.ctx.deactivate is not a function

看了一下有人在vue的仓库也提到了这个问题,等待官方修复吧

@cloudhao1999
Copy link
Owner

vuejs/core#6222

@cloudhao1999 cloudhao1999 added the bug Something isn't working label Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants