vue two routes a route activation process jumps

Sometimes there is a page sub-pages of a page, this time click to open the jump to two pages, this time

A navigation route activation state may not correspond

I am such a deal

<el-menu :default-active="$route.path.match('(/[a-z]+[^/]){1}')[0]"

复制代码

So that it can match the target page routing focus on head matches

Reproduced in: https: //juejin.im/post/5cfa1b1ef265da1bae38ec22

Guess you like

Origin blog.csdn.net/weixin_34082695/article/details/91428296