react-Ant Design 框架中的基础对话框和信息确认框的应用
发布时间
阅读量:
阅读量
前言
在该项目开发过程中,对话框与确认框作为高频使用的界面元素,其基本应用方式在react-Ant Design框架中的实现将在此进行简要说明。
基础对话框
首先应当根据实际需求导入所必需的相关组件:
import {Card, Button, Modal} from 'antd'
设置两个操作按钮,用于触发基础对话框的显示功能:
<Card title="基础对话框">
<Button type="primary" onClick={() => this.handleOpen('showModal')}>Open</Button>
<Button type="primary" onClick={() => this.handleOpen('showModal2')}>Open</Button>
</Card>
此时需要对属性值进行动态配置,以使showModa的值变为true:
state = {
showModal: false,
showModal2: false
}
handl
全部评论 (0)
还没有任何评论哟~
