We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vue-Router 设置动态路由匹配,会根据路由所定义的顺序来匹配。 假如路由配置如下
const router = new VueRouter({ routes: [ { path: '/user/:id' }, { path: '/user/apply' } ] })
遇到路由为/user/xxx格式的,永远只会匹配到/user/:id,不会匹配到/user/apply,即使路由是/user/apply,将后者写在前者前面,就会在匹配不到apply的时候再去匹配动态路由。
/user/xxx
/user/:id
/user/apply
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Vue-Router 设置动态路由匹配,会根据路由所定义的顺序来匹配。
假如路由配置如下
遇到路由为
/user/xxx
格式的,永远只会匹配到/user/:id
,不会匹配到/user/apply
,即使路由是/user/apply
,将后者写在前者前面,就会在匹配不到apply的时候再去匹配动态路由。The text was updated successfully, but these errors were encountered: