react 路由跳转 路由相同参数不同 页面没有刷新 componentWillReceiveProps(nextProps) { const id = nextProps.location.state.id this.setState( { id, } ) } 前端 2023-12-05 204 点赞 3 评论 309 浏览