This commit is contained in:
2022-06-19 19:36:51 +08:00
parent 59b5b1ffb3
commit 833ba1e220
49 changed files with 346 additions and 38629 deletions
-26
View File
@@ -1,26 +0,0 @@
1、路由基本用法
Link
NavLink
Route
BrowserRouter
this.props.children
Switch 只匹配第一次
exact 严格匹配
Redirect 重定向/默认匹配项
路由嵌套
路由传参
params传参,需要声明接收
serach传参,无需声明接收
state
路由模式
replace
push 默认模式
编程式路由
this.props.history.push()
this.props.history.replace()
witchRouter
HashRouter / BrowserRouter
使用哈希路由,路由传值,刷新时值会丢失