提交 26a0ce51 编写于 作者: Z zcdqs 提交者: 李俊峰

fixed 8dd433f2 from https://gitee.com/zcdqs/docs/pulls/13976

change return value of getInspectorTree to object
Signed-off-by: Nzcdqs <junfeng.lijunfeng@huawei.com>
Change-Id: I91f12378656baaf51fa23f7893bc43fdd5c2e9e7
上级 19d0e8d3
...@@ -39,7 +39,7 @@ getInspectorByKey(id: string): string ...@@ -39,7 +39,7 @@ getInspectorByKey(id: string): string
### getInspectorTree<sup>9+</sup> ### getInspectorTree<sup>9+</sup>
getInspectorTree(): string getInspectorTree(): Object
获取组件树及组件属性。 获取组件树及组件属性。
...@@ -49,7 +49,7 @@ getInspectorTree(): string ...@@ -49,7 +49,7 @@ getInspectorTree(): string
| 类型 | 描述 | | 类型 | 描述 |
| ------ | --------------------------- | | ------ | --------------------------- |
| string | 组件树及组件属性列表的JSON字符串。 | | Object | 组件树及组件属性列表的JSON对象。 |
### sendEventByKey<sup>9+</sup> ### sendEventByKey<sup>9+</sup>
...@@ -181,7 +181,7 @@ struct IdExample { ...@@ -181,7 +181,7 @@ struct IdExample {
}.margin({ top: 20 }) }.margin({ top: 20 })
.onClick(() => { .onClick(() => {
console.info(getInspectorByKey("click")) console.info(getInspectorByKey("click"))
console.info(getInspectorTree()) console.info(JSON.stringify(getInspectorTree()))
this.text = "Button 'click to start' is clicked" this.text = "Button 'click to start' is clicked"
setTimeout(() => { setTimeout(() => {
sendEventByKey("longClick", 11, "") // 向id为"longClick"的组件发送长按事件 sendEventByKey("longClick", 11, "") // 向id为"longClick"的组件发送长按事件
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册