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

重写 设计router #18

Open
lh2510 opened this issue Aug 25, 2021 · 0 comments
Open

重写 设计router #18

lh2510 opened this issue Aug 25, 2021 · 0 comments

Comments

@lh2510
Copy link
Collaborator

lh2510 commented Aug 25, 2021

一级路由

/ (home)

/(home)的二级路由

  1. /search
    search by name按回车后
  2. /result
  • search by id按回车后
  • 搜索历史里面点某一条记录
  • search by name按回车后,/search 页面里面点搜索记录,点击某一条

/result一定跟着一个pid,/result页面一加载,就像后端发送请求,拿回pid相关的数据,然后处理数据,把数据显示在Result组件上。

一定要写成这样,路由组件Result才能接收到包含得有{history:{},location:{},match:{}...} 的props

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

No branches or pull requests

1 participant