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

SwipeMove 滑动弹层

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

定义

自定义方向、宽、高、对齐方式可拖出的弹层组件。

图片展示

代码演示


import SwipeMove from 'pile/dist/components/swipemove'
<SwipeMove height="100%" width="100%" direction="bottom" align={0}>
  <div className="move-content">
<h2>弹层展示</h2>
<p>内容自定义</p>
<p>支持高度、宽度自定义</p>
<p>支持方向自定义</p>
  </div>
</SwipeMove>

属性

参数描述数据类型默认值
direction滑动方向:bottom,top,left,rightstringbottom
height高度:"100%" 、"300px"string100%
width宽度:"100%" 、"300px"string100%
align对齐方式 0: center、middle ,1:left 、top 2: right bottomnumber0
backtouchend 后的回调function0