Back to Uni App

Scale Gesture Handler

docs/component/scale-gesture-handler.md

2.3.34.8 KB
Original Source
<!-- ## scale-gesture-handler -->

::: sourceCode

scale-gesture-handler

:::

兼容性

Web微信小程序AndroidiOSHarmonyOSHarmonyOS(Vapor)
<a style="color:unset;" href="https://vote.dcloud.net.cn/#/?name=uni-app%20x">x</a>4.41<a style="color:unset;" href="https://vote.dcloud.net.cn/#/?name=uni-app%20x">x</a><a style="color:unset;" href="https://vote.dcloud.net.cn/#/?name=uni-app%20x">x</a><a style="color:unset;" href="https://vote.dcloud.net.cn/#/?name=uni-app%20x">x</a>-

属性

名称类型默认值兼容性描述
tagstring-Web: x; 微信小程序: 4.41; Android: x; iOS: x; HarmonyOS: x; HarmonyOS(Vapor): -(string)
声明手势协商时的组件标识
worklet:ongestureeventhandler-Web: x; 微信小程序: 4.41; Android: x; iOS: x; HarmonyOS: x; HarmonyOS(Vapor): -(eventhandler)
手势识别成功的回调
worklet:should-response-on-movecallback-Web: x; 微信小程序: 4.41; Android: x; iOS: x; HarmonyOS: x; HarmonyOS(Vapor): -(callback)
手指移动过程中手势是否响应
worklet:should-accept-gesturecallback-Web: x; 微信小程序: 4.41; Android: x; iOS: x; HarmonyOS: x; HarmonyOS(Vapor): -(callback)
手势是否应该被识别
simultaneous-handlersArray.<string>-Web: x; 微信小程序: 4.41; Android: x; iOS: x; HarmonyOS: x; HarmonyOS(Vapor): -(Array.<string>)
声明可同时触发的手势节点
native-viewstring-Web: x; 微信小程序: 4.41; Android: x; iOS: x; HarmonyOS: x; HarmonyOS(Vapor): -(string)
代理的原生节点类型

worklet:ongesture 的属性描述

合法值兼容性描述
stateWeb: x; 微信小程序: 4.41; Android: x; iOS: x; HarmonyOS: x; HarmonyOS(Vapor): -手势状态
focalXWeb: x; 微信小程序: 4.41; Android: x; iOS: x; HarmonyOS: x; HarmonyOS(Vapor): -中心点相对于全局的X坐标
focalYWeb: x; 微信小程序: 4.41; Android: x; iOS: x; HarmonyOS: x; HarmonyOS(Vapor): -中心点相对于全局的Y坐标
focalDeltaXWeb: x; 微信小程序: 4.41; Android: x; iOS: x; HarmonyOS: x; HarmonyOS(Vapor): -相对上一次,中心点在X轴方向移动的坐标
focalDeltaYWeb: x; 微信小程序: 4.41; Android: x; iOS: x; HarmonyOS: x; HarmonyOS(Vapor): -相对上一次,中心点在Y轴方向移动的坐标
scaleWeb: x; 微信小程序: 4.41; Android: x; iOS: x; HarmonyOS: x; HarmonyOS(Vapor): -放大或缩小的比例
horizontalScaleWeb: x; 微信小程序: 4.41; Android: x; iOS: x; HarmonyOS: x; HarmonyOS(Vapor): -scale的横向分量
verticalScaleWeb: x; 微信小程序: 4.41; Android: x; iOS: x; HarmonyOS: x; HarmonyOS(Vapor): -scale的纵向分量
rotationWeb: x; 微信小程序: 4.41; Android: x; iOS: x; HarmonyOS: x; HarmonyOS(Vapor): -旋转角(单位:弧度)
velocityXWeb: x; 微信小程序: 4.41; Android: x; iOS: x; HarmonyOS: x; HarmonyOS(Vapor): -手指离开屏幕时的横向速度(pixel per second)
velocityYWeb: x; 微信小程序: 4.41; Android: x; iOS: x; HarmonyOS: x; HarmonyOS(Vapor): -手指离开屏幕时的纵向速度(pixel per second)
pointerCountWeb: x; 微信小程序: 4.41; Android: x; iOS: x; HarmonyOS: x; HarmonyOS(Vapor): -跟踪的手指数
<!-- UTSCOMJSON.scale-gesture-handler.component_type -->

参见