账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    react-router Link 参数传不过去
    28
    0
    package.json"antd": "^4.17.3","react": "^17.0.2","react-app-rewired": "^2.1.8","react-dom": "^17.0.2","react-redux": "^7.2.6","react-router-dom": "^6.1.1",this属性图page AhandleEdit = row => { console.log(this) // this 属性见上图 this.props.history.push({pathname:'add',state: {name:1}}) // PubSub.publish('shopData',row) 消息发布订阅也没效果} render() { const columns = [ { title: '操作', dataIndex: '', key: 'x', render: (_, record) => <> <Button type='edit' className='mr10' onClick={()=> {this.handleEdit(record)}}> 修改 </Button> {/* <Link to={{pathname: 'add', state: {record}}}>修改</Link> */} <Button type='delete'>删除</Button> </>, }, ];}page BcomponentDidMount () { // 订阅 page A发布的消息 this.shopData = PubSub.subscribe('shopData', (msg,data)=>{ console.log(msg,data); }) // 获取不到Link跳转state的隐式参数}componentWillUnmount () { PubSub.unsubscribe(this.shopData)}还需要什么补充文件请联系我。综上情况请问是什么原因呢?大佬帮帮忙!!!感谢!!!
    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 我想静静 普通会员 1楼
      502 Bad Gateway

      502 Bad Gateway


      nginx
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部