How to listen for refresh events globally in vue single page applications?

there is a tree on the left side of the project, the expansion click is lazy loading, and the tree will be reset every time it is refreshed, so I want to jump back to the home page when I refresh.
so how does the request listen for refresh events throughout the project?
do you use vue-router routing guards?

Sep.16,2021
Menu