index.md 898 字节
Newer Older
A
挖坑  
afc163 已提交
1 2
# Modal

A
afc163 已提交
3
- category: Components
A
挖坑  
afc163 已提交
4 5 6 7
- chinese: 对话框

---

A
afc163 已提交
8 9 10 11 12 13 14
模态对话框。

## 何时使用

需要用户处理事务,又不希望跳转页面以致打断工作流程时,可以使用 `Modal` 在当前页面正中打开一个浮层,承载相应的操作。

## API
A
挖坑  
afc163 已提交
15

Y
yiminghe 已提交
16
属性列表
A
挖坑  
afc163 已提交
17

A
afc163 已提交
18 19 20
| 参数       | 说明           | 类型             | 默认值       |
|------------|----------------|------------------|--------------|
| title      | 标题           | React.Element    | 无           |
Y
yiminghe 已提交
21 22 23 24
| onOk       | 点击确定回调       | function         | 无           |
| onBeforeClose | 点击遮罩层或右上角叉或取消按钮关闭前回调  | function  | 无           |
| width      | 宽度           | String or Number | 500           |
| visible    | 是否显示           | Boolean | false           |
A
afc163 已提交
25
| footer     | 底部内容       | React.Element    | 确定取消按钮 |