想要实现效果,点击Button出现模态框。
代码:
<Button style
={{float
:"right",marginBottom
:10}} type
="primary" onClick
={this.showModal
}>申请假期计划
</Button
>
结果点击没反应,也没进入showModal()方法中。但是去除float:right正常。
解决方案:
<Button style
={{float
:"right",marginBottom
:10,zIndex
:99}} type
="primary" onClick
={this.showModal
}>申请假期计划
</Button
>
设置一个z-index=99即可。
转载请注明原文地址:https://ipadbbs.8miu.com/read-28229.html