icsoc-rc-modal

1.2.5 • Public • Published

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 或者不设 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 组件;

Readme

Keywords

none

Package Sidebar

Install

npm i icsoc-rc-modal

Weekly Downloads

0

Version

1.2.5

License

ISC

Unpacked Size

27.6 kB

Total Files

19

Last publish

Collaborators

  • icsoc