Subscribe on changes!

keep-alive 下的组件加了上 key 没有触发 onBeforeUnmount

avatar
Jul 6th 2022

你默认设置了comp1缓存,不会触发unmount, 是单独的钩子https://vuejs.org/guide/built-ins/keep-alive.html#lifecycle-of-cached-instance

avatar
Jul 6th 2022

你默认设置了comp1缓存,不会触发unmount, 是单独的钩子https://vuejs.org/guide/built-ins/keep-alive.html#lifecycle-of-cached-instance

你看,第二步,已经把 include 修改成 comp2 了。

avatar
Feb 13th 2023

已经修复了。