react中进入某个详情页URL路劲参数Id获取问题时间:2024-04-18 00:39:25 <Route path={`${match.url}/detail/:id`} component={AppManageAddDetail} /> const { match:{params:{ id, }}} = this.props; 一行代码直接搞定. match和params都是this.props自带的属性,不需要单独配置,直接拿来用就行, const { match:{params:{ id, }}} = this.props;