Skip to content
New issue

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

fix: match search is not needed #1166

Merged
merged 1 commit into from
Jul 30, 2019

Conversation

yundongbot
Copy link
Collaborator

匹配路由时应该只需要匹配 pathname 即可,search 不需要强制匹配:

// routers
[
   {
      path: '/search',
      component: () => <Search />,
    }
]

可以匹配到

http://localhost:9999/search
http://localhost:9999/search?q=xxx
http://localhost:9999/search?q=xxx&any_query=xxxx

当前版本无法匹配带 query 的情况。

@wssgcg1213 wssgcg1213 requested a review from yuanyan July 29, 2019 11:24
Copy link
Collaborator

@wssgcg1213 wssgcg1213 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

单测挂了, 看一下 ci 的问题

Copy link
Collaborator

@wssgcg1213 wssgcg1213 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yuanyan yuanyan merged commit 1296eeb into alibaba:master Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants