提交 41fca744 编写于 作者: H hdx

fix(nodes-info): 警告问题

上级 4590be74
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
getNodeInfo() { getNodeInfo() {
uni.createSelectorQuery().select('.rect1').boundingClientRect().exec((ret) => { uni.createSelectorQuery().select('.rect1').boundingClientRect().exec((ret) => {
this.nodeInfoList.length = 0 this.nodeInfoList.length = 0
const i = ret[0]! as NodeInfo const i = ret[0] as NodeInfo
this.nodeInfoList.push({ this.nodeInfoList.push({
left: i.left, left: i.left,
top: i.top, top: i.top,
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
getAllNodeInfo() { getAllNodeInfo() {
uni.createSelectorQuery().selectAll('.rect').boundingClientRect().exec((ret) => { uni.createSelectorQuery().selectAll('.rect').boundingClientRect().exec((ret) => {
this.nodeInfoList.length = 0 this.nodeInfoList.length = 0
const array = ret[0]! as NodeInfo[] const array = ret[0] as NodeInfo[]
array.forEach((i) => { array.forEach((i) => {
this.nodeInfoList.push({ this.nodeInfoList.push({
left: i.left, left: i.left,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册