需要参考下面代码实现:实现类似图库图片可放大缩小滑动的效果。参考图库源码:https://gitee.com/openharmony/applications\_photos/tree/master关键代码:图片Item组件:applications\_photos/common/src/main/ets/default/view/PhotoItem.ets手势处理逻辑:PanGesture…冲突处理逻辑:.onTouch((event?: TouchEvent) => { this.dealTouchEvent(event as TouchEvent); this.eventPipeline?.onTouch(event as TouchEvent); })手势管道处理工具:applications\_photos/common/src/main/ets/default/model/browser/photo/EventPipeline.ts设置swiper滑动状态逻辑:public setSwipeStatus(disable: Boolean): void { this.broadCast.emit(PhotoConstants.SET_DISABLE_SWIPE, [disable]); }整体逻辑是在手势管道中通过事件通知swiper禁用或启用滑动手势。OH当前能力是可以实现的。图片轮播页面:applications\_photos/common/src/main/ets/default/view/PhotoSwiper.ets
需要参考下面代码实现:实现类似图库图片可放大缩小滑动的效果。
参考图库源码:https://gitee.com/openharmony/applications\_photos/tree/master
关键代码:
图片Item组件:applications\_photos/common/src/main/ets/default/view/PhotoItem.ets
手势处理逻辑:PanGesture…
冲突处理逻辑:
手势管道处理工具:
applications\_photos/common/src/main/ets/default/model/browser/photo/EventPipeline.ts
设置swiper滑动状态逻辑:
整体逻辑是在手势管道中通过事件通知swiper禁用或启用滑动手势。OH当前能力是可以实现的。
图片轮播页面:applications\_photos/common/src/main/ets/default/view/PhotoSwiper.ets