1.2.5 • Published 5 years ago

icsoc-rc-modal v1.2.5

Weekly downloads
2
License
ISC
Repository
-
Last release
5 years ago

category: Components type: 信息反馈 title: Modal subtitle: 对话框 modifiedJs: 1

order: 1

在 Ant Design 的 Modal 组件上进行的扩展。不同之处主要在于:

  1. 增加了 size 属性,设置了 width 属性的默认值。

    size 可用来设置弹框的大小尺寸, width 可用来修改弹框的宽度(详情请查看代码演示与 API)。

  2. 增加了 mode type 属性,设置了 okText width 属性的默认值。

    mode 表示简短提示框或者是普通提示框, type 表示提示框的类型, okText 可设置提示框确认按钮的文字, width 可设置提示框的宽度。

API

ModalSize

参数说明类型默认值
size弹框尺寸,可选值为 small large 或者不设stringdefault
width宽度string| number600

size 属性表示弹框的尺寸。small 宽度 450px,middle 宽度 600px,large 宽度 900px。width 属性可以覆盖 size 属性。

modalTips()

modalTips 为一个函数,参数为 object;

参数说明类型默认值
mode提示框模式,可选值为 simple 或者不设stringdefault
type提示框提示类型,可选值为 info success error warning confirmstringwarning
okText确认按钮文字string简短提示框 我知道了,普通提示框 确定
width宽度string | number简短提示框 260,普通提示框 434

EditDrawer

参数说明类型默认值
shwBottomBtn是否展示底部按钮booleantrue
bottombtnConfig配置底部按钮。text 表示按钮文字,onClick 表示按钮事件。默认展示 保存 取消 按钮。array
onSave点击保存按钮的回调function(e)
onClose点击取消按钮或左上角或遮罩层的回调function(e)

其余参数请参考 ant-design 的 Drawer 组件;