赞
踩
创建手势组合
- .gesture(
-
- GestureGroup(GestureMode.Parallel,
-
-
- PinchGesture({ count: 2 })
- .onActionStart((event: GestureEvent|undefined) => {
- console.info('Pinch start');
- })
-
- PanGesture(this.panOption)
- .onActionStart((event?: GestureEvent) => {
-
- })
- )
实现效果是两指捏和,单指移动。
可是只有单指移动是好用的,代码如下
- .gesture(
-
- GestureGroup(GestureMode.Parallel,
-
-
- // PinchGesture({ count: 2 })
- // .onActionStart((event: GestureEvent|undefined) => {
- // console.info('Pinch start');
- // })
-
- PanGesture(this.panOption)
- .onActionStart((event?: GestureEvent) => {
-
- })
- )
只要两个同时存在就会导致异常
解决办法
将 count 改为 fingers ,
fingers 才表示识别两个手指的操作
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。