[英]React - How to remove a button in Ant Design Modal
I installed the Ant Design framework for my React project but how can I not remove the button from the name " cancle "我为我的 React 项目安装了 Ant 设计框架,但我怎么能不从名称“ cancle ”中删除按钮
I'll leave a link to codesandbox and documentation我将留下代码沙盒和文档的链接
As in the docs use footer
props for custom footer button bar:如在文档中使用
footer
道具自定义页脚按钮栏:
<Modal
visible={visible}
title="Title"
onOk={this.handleOk}
onCancel={this.handleCancel}
footer={[
<Button
key="submit"
type="primary"
loading={loading}
onClick={this.handleOk}
>
Submit
</Button>
]}
>
<p>Some contents...</p>
<p>Some contents...</p>
<p>Some contents...</p>
<p>Some contents...</p>
<p>Some contents...</p>
</Modal>
here is a codesandbox这是一个代码框
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.