
回复
添加资源
添加资源将有机会获得更多曝光,你也可以直接关联已上传资源
去关联
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