The router.js route shows:
html:
Correspond a field in the loop to a field in the route. What I directly choose here is the address path.
Set: class="{active:$route.path === item.menuUrl}"
You can control the navigation active style without setting the click event on the li tag; whether it is a button jump in the page or a page refresh, the active style will never fail.