@beisen-phoenix/mobile-popup

弹层容器组件

Usage no npm install needed!

<script type="module">
  import beisenPhoenixMobilePopup from 'https://cdn.skypack.dev/@beisen-phoenix/mobile-popup';
</script>

README

mobile-popup组件

弹层容器组件

分类

export { Drawer, Modal, Popover }

Drawer(抽屉组件)

props

name description type default 是否为必传
visible 展示、隐藏 boolean true
placement 弹出方向 :left , right , top , bottom string left
width 容器宽度 string ,number 百分比
height 容器高度 string ,number 百分比
mask 是否带遮罩 boolean true
maxHeight 最大高度 string 70%
onClose 关闭弹层的回调函数 function onClose: () => { }

Modal(对话框)

props

name description type default 是否为必传
visible 展示、隐藏 boolean true
hasCloseBtn 是否带有关闭按钮 boolean false
width 容器宽度 string ,number 百分比
height 容器高度 string ,number 百分比
mask 是否带遮罩 boolean true
maxHeight 最大高度 string 70%
hasCloseBtn 是否显示关闭按钮 boolean
onClose 关闭弹层的回调函数 function onClose: () => { }
maskCls 自定义遮罩classname string
mainViewCls 自定义内容container className string

Popover(气泡框弹层)

name description type default 是否为必传
visible 展示、隐藏 boolean true
hasArrow 是否显示上箭头 boolean false
hotAreaOffset 触发弹层显示的元素位置信息,一般都是getBoundingClientRect函数的返回值 object false true
mask 是否带遮罩 boolean true
style popover内容的样式 object {backgroundColor:'white',width:'60%',maxHeight:'70%',borderRadius:'4px'}
maskStyle 遮罩的样式 obj undefined
prefixCls 自定义class string phoenix-popup
getPopoverContainer 自定义popover渲染到的节点 () => JSX undefined
onClose 关闭弹层的回调函数 function onClose: () => { }