From 8dd433f27b8519b51571422572be4e2e128a04df Mon Sep 17 00:00:00 2001 From: zcdqs Date: Sun, 29 Jan 2023 13:00:53 +0000 Subject: [PATCH] change return value of getInspectorTree to object Signed-off-by: zcdqs Change-Id: I91f12378656baaf51fa23f7893bc43fdd5c2e9e7 --- .../arkui-ts/ts-universal-attributes-component-id.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-component-id.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-component-id.md index 12c17eea62..f56a0c9795 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-component-id.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-component-id.md @@ -39,7 +39,7 @@ getInspectorByKey(id: string): string ### getInspectorTree9+ -getInspectorTree(): string +getInspectorTree(): Object 获取组件树及组件属性。 @@ -49,7 +49,7 @@ getInspectorTree(): string | 类型 | 描述 | | ------ | --------------------------- | -| string | 组件树及组件属性列表的JSON字符串。 | +| Object | 组件树及组件属性列表的JSON对象。 | ### sendEventByKey9+ @@ -181,7 +181,7 @@ struct IdExample { }.margin({ top: 20 }) .onClick(() => { console.info(getInspectorByKey("click")) - console.info(getInspectorTree()) + console.info(JSON.stringify(getInspectorTree())) this.text = "Button 'click to start' is clicked" setTimeout(() => { sendEventByKey("longClick", 11, "") // 向id为"longClick"的组件发送长按事件 -- GitLab