router-link-exact-active router-link-active区别

router-link-exact-active router-link-active区别是什么?文档中精准匹配又是什么意思?

阅读 4.6k
2 个回答

感觉应该是这样
/router 可以匹配/router 和 /router/2
而如果使用exact的话
/router 则只能匹配/router,不能匹配/router/2

就是精确匹配的意思,举个栗子:

两路由 {path:'/',name:'home',component:Home},{path:'/about',name:'about',component:About}

例如 URL:http://localhost:8080/about 路径下, about 是精确匹配,home 这个是匹配,这两个都被匹配了。

推荐问题