未验证 提交 cf0b33ce 编写于 作者: O openharmony_ci 提交者: Gitee

!6413 【轻量级 PR】:update...

!6413 【轻量级 PR】:update zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-component-id.md.
Merge pull request !6413 from zqzhaocg/N/A
...@@ -171,17 +171,17 @@ struct IdExample { ...@@ -171,17 +171,17 @@ struct IdExample {
console.info(getInspectorTree()) console.info(getInspectorTree())
this.text = "Button 'click to start' is clicked" this.text = "Button 'click to start' is clicked"
setTimeout(() => { setTimeout(() => {
sendEventByKey("longclick", 11, "") sendEventByKey("longClick", 11, "")
}, 2000) }, 2000)
}).id('click') }).id('click')
Button() { Button() {
Text('longclick').fontSize(25).fontWeight(FontWeight.Bold) Text('longClick').fontSize(25).fontWeight(FontWeight.Bold)
}.margin({ top: 20 }).backgroundColor('#0D9FFB') }.margin({ top: 20 }).backgroundColor('#0D9FFB')
.gesture( .gesture(
LongPressGesture().onActionEnd(() => { LongPressGesture().onActionEnd(() => {
console.info('long clicked') console.info('long clicked')
this.text = "Button 'longclick' is longclicked" this.text = "Button 'longClick' is longclicked"
setTimeout(() => { setTimeout(() => {
let rect = Utils.getComponentRect('onTouch') let rect = Utils.getComponentRect('onTouch')
let touchPoint: TouchObject = { let touchPoint: TouchObject = {
...@@ -196,7 +196,7 @@ struct IdExample { ...@@ -196,7 +196,7 @@ struct IdExample {
touchPoint.type = TouchType.Up touchPoint.type = TouchType.Up
sendTouchEvent(touchPoint) sendTouchEvent(touchPoint)
}, 2000) }, 2000)
})).id('longclick') })).id('longClick')
Button() { Button() {
Text('onTouch').fontSize(25).fontWeight(FontWeight.Bold) Text('onTouch').fontSize(25).fontWeight(FontWeight.Bold)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册