SwipeoutView

SwipeoutView 是一个基础的滑动控件,目前只支持左滑。 它有俩部分组成:需要滑动的主内容ContentView以及左滑显示的RightView。 另外还需要指定滑动的最大距离,默认情况下RightView 高度不会超过ContentView。

用法样例:

let
 rightView = 
<
View
style
=
{styles.swipe_btn}
>
<
Text
>
我是按钮
<
/
Text
>
<
/
View
>
;

 render() {

<
View
style
=
{styles.container}
>
<
SwipeoutView
style
=
{styles.swipe}
rightView
=
{rightView}
maxRightSpacing
=
{180}
>
<
Text
style
=
{styles.sss}
>
我是内容
<
/
Text
>
<
/
SwipeoutView
>
<
/
View
>

}

截图

属性

rightView view

需要显示的rightView

maxRightSpacing number

滑动距离

onOpenStatusChange function

当控件被滑动打开或者滑动关闭时候执行此回调,参数:{isOpen : true}

onSwipeBegin function

当控件开始滑动时的回调

onSwipeEnd function

当控件滑动结束时的回调

close boolean

控制控件是否要被打开或者关闭,setclose为true即关闭

results matching ""

    No results matching ""