Multi-page jump, vue life cycle beforeDestroy, destroyed will not be triggered?

problem description

use the a tag to jump to another page, and the vue lifecycle beforeDestroy and destroyed of the current page will not be triggered.

the environmental background of the problems and what methods you have tried

these lifecycles are triggered for components written on a single page in a scaffolding project.

related code (just open the web page and debug with debugger)

https://gottayan.github.io/sc.

beforeDestroy: function () {

var sTop = document.body.scrollTop + document.documentElement.scrollTop;
sessionStorage.setItem("offset", sTop);

}

Dec.31,2021
Menu