摘要: 前进后退不可使用 (独立页面相似意思) 普通式重定向 1.设置route <Route path="/home/" component={Home}/> 2.书写组件 import React, { Component } from 'react' class Home extends Compon 阅读全文
posted @ 2022-06-13 03:37 SimoonJia 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 1.设置规则 <Route path="/list/:id" component={List}/> {/* 1.规则 */} 2.传值(或在地址栏自己设置) <li><Link to="/list/123">列表</Link></li> 3.接收值 import React, { Component 阅读全文
posted @ 2022-06-13 03:12 SimoonJia 阅读(80) 评论(0) 推荐(0) 编辑
摘要: <Route path="/" exact component={Index}/> <Route path="/list/" component={List}/> /: 加exact 地址栏 /***匹配不到/对应的component 不加exact /***能匹配到 /list/: 加exact 阅读全文
posted @ 2022-06-13 02:19 SimoonJia 阅读(85) 评论(0) 推荐(0) 编辑