代码

<Modal width={800} title="新增" visible={this.state.modalVisible}
                        onCancel={() => { this.setState({ modalVisible: false }); }}
                        onOk={this.handleModalOk.bind(this)}
                        confirmLoading={this.state.confirmLoading}
                        // footer={
                        //     [] // 设置footer为空,去掉 取消 确定默认按钮
                        //     }
                        // footer={[
                        //     // 定义右下角 按钮的地方 可根据需要使用 一个或者 2个按钮
                        //     <Button key="back" onClick={() => { this.setState({ modalVisible: false }); }}>取消</Button>,
                        //     <Button key="submit" type="primary" onClick={this.handleModalOk.bind(this)} disabled={this.state.okButtonFlag}>
                        //     确认
                        //     </Button>, ]}
                            >

footer可以自定义设置模态框的取消确认按钮

disabled={this.state.okButtonFlag}可以根据情况使确认按钮是否可以点击

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-05
  • 2021-11-15
  • 2022-12-23
猜你喜欢
  • 2022-02-17
  • 2021-12-01
  • 2022-12-23
  • 2022-12-23
  • 2021-08-31
  • 2021-09-17
相关资源
相似解决方案