回复
HarmonyOS应用开发ets基础手势TapGesture
鸿蒙时代
发布于 2022-1-8 12:13
浏览
0收藏
3.代码示例
@Entry
@Component
struct Index {
@State value: string = ''
build() {
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Text('连续点击两次')
.fontSize(20)
Text(this.value)
.fontSize(20)
}
.height(200).width(300).padding(60).border({ width: 1 }).margin(30)
.gesture(
TapGesture({ count: 2 })
.onAction(() => {
this.value = 'this TapGesture onAction'
})
)
}
}
4.效果
(A)->(B)
代码地址:
https://gitee.com/jltfcloudcn/jump_to/tree/master/JLTF_TapGesture
分类
标签
HarmonyOS应用开发ets基础手势TapGesture.docx 32.65K 18次下载
赞
1
收藏
回复
相关推荐