usePointerEvent
用于将 TouchEvent 与 MouseEvent 统一为 PointerEvent 的 hook,便于跨平台处理指针事件。
示例
类型定义
回调前缀会映射到对应的事件绑定模式:
onPointerDown->bindmousedown和bindtouchstartcatchPointerDown->catchmousedown和catchtouchstartcaptureBindPointerDown->capture-bindmousedown和capture-bindtouchstartcaptureCatchPointerDown->capture-catchmousedown和capture-catchtouchstart
追加 MT 可以使用主线程版本,例如 captureCatchPointerDownMT 会映射到 main-thread:capture-catchmousedown 和 main-thread:capture-catchtouchstart。