react

1.跳转指定页面

报错: Cannot read properties of undefined (reading 'push')

解决办法如下:

  // 1.1引用组件

import {
NavLink,
withRouter
} from 'react-router-dom';

// 跳转指定页面
gotolist2 = () => {
this.props.history.push('/InvoiceManage/inputInvoice/list');
}


//最后
export default withRouter(EditableTable)



posted @ 2021-10-14 16:40  泡沫幻影  阅读(124)  评论(0编辑  收藏  举报