Appearance
纵向滑动 v1.1.0
方法名
slideVertical
用法
- 用法如下:js
module.slideVertical({ //起始X相对屏幕百分比,取值范围[0, 1] xPercent: 0.5, //起点Y相对屏幕百分比,取值范围[0, 1] yStartPercent: 0.3, //终点Y相对屏幕百分比,取值范围[0, 1] yEndPercent: 0.7, //滑动时长,单位:毫秒 duration: 500 }, res => {})1
2
3
4
5
6
7
8
9
10 - 参数说明
参数名 参数类型 是否必填 默认值 参数描述 xPercent Integer 是 无 起始X相对屏幕百分比,取值范围[0, 1] yStartPercent float 是 无 起点Y相对屏幕百分比,取值范围[0, 1],0.5为屏幕中间 yEndPercent Integer 是 无 终点Y相对屏幕百分比,取值范围[0, 1] duration Integer 是 无 滑动时长,单位:毫秒
回调
- 示例json
{ "data": {}, "message": "", "code": 0 }1
2
3
4
5 - 回调说明:
参数名 参数类型 参数描述 message String 消息提示 data Object 数据对象 code Integer 返回类型,0.成功,其他:失败