Recently, it is necessary to use routing guards in the project to judge that the routing returns to the specified page, and it will not take effect in the process of using subcomponents.
Routing components refer to the components used in the routes.js file. Subcomponents and ordinary components are not routing components, so the routing guard hook function will not take effect.
Reference: https://www.cnblogs.com/baifangzi/p/14481820.html