$ cnpm install @uyun/ec-side-modal
作者:王悦瑾
点击查看内容,内容要以右侧滑出弹框形式展开。
可自定义名称,大小,位置的侧滑框。
属性说明如下:
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
title | 标题 | string / number | - |
width | 宽度 | string / number | "900" |
height | 高度 | string / number | document.body.clientHeight-10(浏览器高度) |
top | 距顶部距离 | string / number | "5" |
visible | 侧滑框是否可见 | boolean | false |
onCancel | 点击遮罩层/右上角叉/取消按钮的回调 | function(e) | - |
maskClosable | 点击蒙层是否允许关闭 | boolean | true |
mask | 是否展示遮罩 | boolean | true |
destroyOnClose | 关闭时销毁 Modal 里的子元素 | boolean | false |
<SideModal />
默认关闭后状态不会自动清空, 如果希望每次打开都是新内容,请设置 destroyOnClose。
SideModal.Detail
为一个函数参数为 object,具体属性如下:参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
title | 标题 | string / number | - |
width | 宽度 | string / number | "900" |
height | 高度 | string / number | document.body.clientHeight-10(浏览器高度) |
top | 距顶部距离 | string / number | "5" |
content | 简易侧滑框的内容dom | ReactNode | - |
maskClosable | 点击蒙层是否允许关闭 | boolean | true |
Copyright 2013 - present © cnpmjs.org