标签:rop color ons strategy tor lse ssi 路由 isp
记录目前用的比较舒服的方式:
1、跳转
<Button type="secondary" size=‘small‘ > <Link to={{ pathname: ‘/base/strategyList‘,search:id+‘‘, query: {sceneId:id,record:record} }}>查看</Link> </Button>
2、获取值:
componentDidMount() { const {dispatch,location}=this.props; let recvParam; if(location.query&&location.query.record){//判断当前有参数 recvParam=location.query.record; sessionStorage.setItem(‘data‘,recvParam);// 存入到sessionStorage中 }else{ recvParam=sessionStorage.getItem(‘data‘);// 当state没有参数时,取sessionStorage中的参数 } this.setState({ recvParam }) console.log("recvParam",recvParam) }
标签:rop color ons strategy tor lse ssi 路由 isp
原文地址:https://www.cnblogs.com/the-fool/p/11365425.html