React
{
path:'/',
component:Admin,
children:[
{
path:'/demo1',
component:Demo1
},
{
path:'/demo2',
component:Demo2
},
{
path:'/demo3',
component:Demo3
}
]
}
1、跳转:this.props.history.push('/1234')
接收:this.props.match.params.userId
2、跳转:this.props.history.push({ pathname: '/home' , query : { id: '6666' }})
接收:this.props.location.query.id
3、跳转:this.props.history.push({ pathname: '/home' , state: { id: '6666' }})
接收:this.props.location.state.id