当前位置: 首页 > 文档资料 > Pile.js 中文文档 >

FadeIn 自定义弹层

优质
小牛编辑
123浏览
2023-12-01

定义

自定义弹层(方向、对齐方式、宽高都可以自定义)

图片展示

代码演示


import FadeIn from 'pile/dist/components/fadein'
<FadeIn  
show={false} 
direction="bottom"
height="auto"
width="100%"
align = {0}
contentPadding={false} 
showBack={()=>{console.log("open")}} 
closeBack={()=>{console.log("close")}}
>
内容随心所欲的添加
</FadeIn>

属性

参数描述数据类型默认值
show状态 :true 展开,false 关闭boolfalse
closeBtnText关闭按钮文案string"确定"
closeShow关闭按钮是否展示booltrue
changeFun展开与关闭切换时回调,参数:true 展开,false 关闭function
direction滑动方向 bottom , top , left ,rightstring"bottom"
height高度支持("100%","300px","auto")string"auto"
width宽度支持("100%","300px")string"auto"
align对齐方式:0:水平或者垂直居中,1 :左对齐或者顶部对齐,2右对齐或者底部对齐number0
closeBack关闭时的回调function
transparent背景是否透明boolfalse
showBack展开时的回调function