// 删除功能 handleDel = () => { const { dispatch} = this.props; const {selectedRowKeys} = this.state; const _this = this; confirm ({ title: '提示', content: '您确认要删除吗?', okText: '确认', okType: 'danger', cancelText: '取消', onOk () { dispatch({ type:'smsModel/getupdateBatchDel', payload:{ body:{ idList: selectedRowKeys, } } }).then (()=> { _this.refreshList(); }); } }) }
htmlhtml
<Button type="primary" htmlType="submit"
onClick={() => this.handleDel()}style={{marginRight:"20px"}}> 删除 </Button>