1.使用query傳遞
this.props.history.push({ pathname : '/access_control/role/roleEdit',query:{ aa: 'aa'} })
獲取參數:
this.props.location.query.aa
2.使用state傳遞
this.props.history.push({ pathname : '/access_control/role/roleEdit',state:{ aa: 'aa'} })
獲取參數:
this.props.location.state.aa
state傳的參數是加密的,query傳的參數是公開的,在地址欄