提交 fdf81880 编写于 作者: H hdx

swiper-list,long-list: 优化代码警告问题

上级 cda15ab4
......@@ -79,8 +79,8 @@
}
},
onReady() {
this.$headerHeight = (this.$refs["header"] as INode)?.offsetHeight as number
this.$swiperWidth = (this.$refs["swiper"] as INode)?.offsetWidth as number
this.$headerHeight = (this.$refs["header"] as INode).offsetHeight
this.$swiperWidth = (this.$refs["swiper"] as INode).offsetWidth
this.queryTabItemsSize()
this.setSwiperIndex(0, true)
},
......@@ -117,8 +117,8 @@
const tabs = this.$refs["swipertab"] as INode[]
tabs.forEach((node) => {
this.$swiperTabsRect.push({
left: node.offsetLeft as number,
width: node.offsetWidth as number
left: node.offsetLeft,
width: node.offsetWidth
} as SwiperTabsItem)
})
},
......
......@@ -55,7 +55,7 @@
}
},
onReady() {
this.$swiperWidth = (this.$refs["swiper"] as INode)!.offsetWidth! as number
this.$swiperWidth = (this.$refs["swiper"] as INode).offsetWidth
this.queryTabItemsSize()
this.setSwiperIndex(0, true)
},
......@@ -90,8 +90,8 @@
const tabs = this.$refs["swipertab"] as INode[]
tabs.forEach((node) => {
this.$swiperTabsRect.push({
left: node.offsetLeft as number,
width: node.offsetWidth as number
left: node.offsetLeft,
width: node.offsetWidth
} as SwiperTabsItem)
})
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册