#鸿蒙学习大百科#如何监听组件的双击操作?

如何监听组件的双击操作?

HarmonyOS
2024-09-26 09:48:44
129浏览
收藏 0
回答 1
回答 1
按赞同
/
按时间
朝花惜拾丶
import { promptAction } from '@kit.ArkUI'

@Entry
@Component
struct Index {
  build() {
    Column() {
      Image($r("app.media.app_icon"))
        .width(100)
        .height(100)
        .gesture(TapGesture().onAction(e => {
          //双击回调
          promptAction.showToast({ message: "双击" })
        })
        )
    }
    .height('100%')
    .width('100%')
  }
}
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
分享
微博
QQ
微信
回复
2024-09-26 16:14:59
相关问题