未验证 提交 fba55240 编写于 作者: L luoying_ace 提交者: Gitee

update zh-cn/application-dev/reference/arkui-ts/ts-basic-gestures-longpressgesture.md.

Signed-off-by: Nluoying_ace <luoying19@huawei.com>
上级 f0054d23
......@@ -41,16 +41,16 @@ struct LongPressGestureExample {
build() {
Column() {
Text('LongPress onAction:' + this.count).fontSize(28)
//单指长按文本触发该手势事件
// 单指长按文本触发该手势事件
.gesture(
LongPressGesture({ repeat: true })
//由于repeat设置为true,长按动作存在时会连续触发,触发间隔为duration(默认值500ms)
// 由于repeat设置为true,长按动作存在时会连续触发,触发间隔为duration(默认值500ms)
.onAction((event: GestureEvent) => {
if (event.repeat) {
this.count++;
}
})
//长按动作一结束触发
// 长按动作一结束触发
.onActionEnd(() => {
this.count = 0;
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册