Vue: When there is only one child route when the route is nested, the parent route does not display the problem

By setting the parent element:

alwaysShow:true

Parents with multiple child routes (menus) under the parent route (menu) can be displayed normally, only the parent route (menu) with one child route (menu) under the parent will not be displayed. Because there is only one child route (menu), it is caused by the parent's hidden and non-displayed attribute. Set alwaysShow: true at the parent level to ensure that the parent level with only one submenu is displayed.

Guess you like

Origin blog.csdn.net/m0_60237095/article/details/128983634