1.0.17 • Published 4 years ago
@beisen-cmps/intelligent-pop v1.0.17
自适应位置的弹层
位置规范:
demo
import RenderPop from '@beisen-cmps/intelligent-pop';
export default Mypop extends React.Component{
render(){
return <RenderPop
width={POP_WIDTH}
height={POP_HEIGHT}
relativePositionDom={relativePositionDom}
onClickOutside={}// 点击弹层外的事件 比如消失
scrollFollower={scrollFollower}// 如果滚动条不在body上,又希望滚动跟随的话,传这个参数,值为滚动条区域的DOM节点
>
123
</RenderPop>
}
}
- props说明:
width // 弹窗的宽度
height // 弹窗的高度
relativePositionDom // 相对哪个元素来定位,就是上图中那个方块
scrollFollower // 如果滚动条不在body上,又希望滚动跟随的话,传这个参数,值为滚动条区域的DOM节点