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

!13976 getInspectorTree接口返回值修改为Object

Merge pull request !13976 from 李俊峰/getinspectortree
......@@ -39,7 +39,7 @@ getInspectorByKey(id: string): string
### getInspectorTree<sup>9+</sup>
getInspectorTree(): string
getInspectorTree(): Object
获取组件树及组件属性。
......@@ -49,7 +49,7 @@ getInspectorTree(): string
| 类型 | 描述 |
| ------ | --------------------------- |
| string | 组件树及组件属性列表的JSON字符串。 |
| Object | 组件树及组件属性列表的JSON对象。 |
### sendEventByKey<sup>9+</sup>
......@@ -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"的组件发送长按事件
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册