提交 100a14de 编写于 作者: H huangdong57

修改doc文档示例代码

Signed-off-by: Nhuangdong57 <huangdong57@huawei.com>
上级 67d5f551
......@@ -127,7 +127,7 @@ import componentUtils from '@ohos.componentUtils';
@Entry
@Component
struct Utils{
static getComponentRect(key) {
private getComponentRect(key) {
console.info("Mode Key: " + key);
let modePosition = componentUtils.getRectangleById(key);
......@@ -202,7 +202,7 @@ struct Utils{
Text('getRectangleById').fontSize(40).fontWeight(FontWeight.Bold);
}.margin({ top: 20 })
.onClick(() => {
Utils.getComponentRect("image_01");
this.getComponentRect("image_01");
}).id('onClick');
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册