HarmonyOS鸿蒙Next中inputMonitor on( touch ) 报 Argument of type touch is not assignable to parameter of type threeFinger
HarmonyOS鸿蒙Next中inputMonitor on( touch ) 报 Argument of type touch is not assignable to parameter of type threeFinger inputMonitor on( touch ) 报 Argument of type touch is not assignable to parameter of type threeFinger
多模touchEvent与arkUI的touchEvent,同名冲突。重命名后再引入多模的touchEvent解决
更多关于HarmonyOS鸿蒙Next中inputMonitor on( touch ) 报 Argument of type touch is not assignable to parameter of type threeFinger的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html
在HarmonyOS鸿蒙Next中,inputMonitor.on(touch)
报错"Argument of type ‘touch’ is not assignable to parameter of type ‘threeFinger’"是因为inputMonitor.on
方法的参数类型不匹配。inputMonitor.on
方法期望的参数类型是threeFinger
,而实际传递的参数类型是touch
,导致类型不匹配的错误。需要确保传递的参数类型与inputMonitor.on
方法期望的类型一致。
在HarmonyOS鸿蒙Next中,inputMonitor.on(touch)
报错的原因是参数类型不匹配。inputMonitor.on
方法期望的参数类型是threeFinger
,而你传递的是touch
类型。请确保传递的参数类型与方法签名一致。例如,如果需要监听三指触摸事件,应使用threeFinger
作为参数。正确的调用方式为:inputMonitor.on(threeFinger)
。