1.2.5 • Published 6 years ago
icsoc-rc-modal v1.2.5
category: Components type: 信息反馈 title: Modal subtitle: 对话框 modifiedJs: 1
order: 1
在 Ant Design 的 Modal 组件上进行的扩展。不同之处主要在于:
- 增加了
size属性,设置了width属性的默认值。size可用来设置弹框的大小尺寸,width可用来修改弹框的宽度(详情请查看代码演示与 API)。 - 增加了
modetype属性,设置了okTextwidth属性的默认值。mode表示简短提示框或者是普通提示框,type表示提示框的类型,okText可设置提示框确认按钮的文字,width可设置提示框的宽度。
API
ModalSize
| 参数 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| size | 弹框尺寸,可选值为 small large 或者不设 | string | default |
| width | 宽度 | string| number | 600 |
size 属性表示弹框的尺寸。small 宽度 450px,middle 宽度 600px,large 宽度 900px。width 属性可以覆盖 size 属性。
modalTips()
modalTips 为一个函数,参数为 object;
| 参数 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| mode | 提示框模式,可选值为 simple 或者不设 | string | default |
| type | 提示框提示类型,可选值为 info success error warning confirm | string | warning |
| okText | 确认按钮文字 | string | 简短提示框 我知道了,普通提示框 确定 |
| width | 宽度 | string | number | 简短提示框 260,普通提示框 434 |
EditDrawer
| 参数 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| shwBottomBtn | 是否展示底部按钮 | boolean | true |
| bottombtnConfig | 配置底部按钮。text 表示按钮文字,onClick 表示按钮事件。默认展示 保存 取消 按钮。 | array | |
| onSave | 点击保存按钮的回调 | function(e) | 无 |
| onClose | 点击取消按钮或左上角或遮罩层的回调 | function(e) | 无 |
其余参数请参考 ant-design 的 Drawer 组件;