未验证 提交 1cbb6ace 编写于 作者: Anne_LXM's avatar Anne_LXM 提交者: Gitee

update docs/api/ui/nodes-info.md.

更新示例
上级 45671f49
...@@ -202,14 +202,16 @@ view.boundingClientRect(data => { ...@@ -202,14 +202,16 @@ view.boundingClientRect(data => {
} }
} }
}, },
onReady () { onReady() {
const result = dom.getComponentRect(this.$refs.box, option => { setTimeout(()=> {
console.log('getComponentRect:', option) const result = dom.getComponentRect(this.$refs.box, option => {
this.size = option.size console.log('getComponentRect:', option)
}) this.size = option.size
console.log('return value:', result) })
console.log('viewport:', dom.getComponentRect('viewport')) console.log('return value:', result)
} console.log('viewport:', dom.getComponentRect('viewport'))
}, 100);
}
} }
</script> </script>
``` ```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册