【发布时间】:2019-12-02 23:32:08
【问题描述】:
我正在使用 lib react-bootstrap-sweetalert 来处理弹出窗口。到目前为止,一切都很好。但是,当我尝试实现他们的一个道具showCloseButton - 描述为here - 时,关闭按钮不会显示在我的警报中的任何位置。然后,我尝试将代码复制粘贴到他们的示例here 中,代码如下:
<SweetAlert
custom
showCancel
showCloseButton
confirmBtnText="Yes"
cancelBtnText="No"
confirmBtnBsStyle="primary"
cancelBtnBsStyle="default"
customIcon="https://raw.githubusercontent.com/djorg83/react-bootstrap-sweetalert/master/demo/assets/thumbs-up.jpg"
title="Do you like thumbs?"
onConfirm={this.onConfirm}
onCancel={this.onCancel}
>
You will find they are up!
</SweetAlert>
“x”关闭按钮仍未显示在我的警报中。然后,我尝试在他们的示例中显示警报,显示关闭按钮!这里出了什么问题?我已经复制粘贴了,它不起作用。但是,它正在他们的示例网站上工作。无论如何,我使用的是^4.4.1 的react-bootstrap-sweetalert 版本。
【问题讨论】:
标签: javascript reactjs sweetalert