app.vue
<div id="app">
<keep-alive exclude="Detail">
<router-view/>
</keep-alive>
</div>
Detail.vueComm.vue
activated () {
window.addEventListener("scroll", this.handleScroll)
},
deactivated () {
window.removeEventListener("scroll", this.handleScroll)
}
In vue, exclude sets a component in keep-alive, and the subcomponents of this component do not execute the activated function?
how should this code be modified?