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

!21084 提供获取组件绘制区域坐标和大小的能力doc文档示例代码错误修改

Merge pull request !21084 from huangdong/RM003_0719
......@@ -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.
先完成此消息的编辑!
想要评论请 注册