diff --git a/pages/template/long-list/long-list.uvue b/pages/template/long-list/long-list.uvue index b3d1d10970158003c7ff139514726ec150385620..9efae74407e31aaa0a121587a14dec6b5ac7d28c 100644 --- a/pages/template/long-list/long-list.uvue +++ b/pages/template/long-list/long-list.uvue @@ -87,10 +87,10 @@ }, onReady() { this.$pageScrollView = this.$refs['pageScrollView'] as INode; - this.$headerHeight = (this.$refs["header"] as INode).offsetHeight - this.$swiperWidth = (this.$refs["swiper"] as INode).getBoundingClientRect().width - this.$tabScrollView = this.$refs.get('tabScroll') as INode - this.$indicatorNode = this.$refs.get('indicator') as INode + this.$headerHeight = (this.$refs['header'] as INode).offsetHeight + this.$swiperWidth = (this.$refs['swiper'] as INode).getBoundingClientRect().width + this.$tabScrollView = this.$refs['tabScroll'] as INode + this.$indicatorNode = this.$refs['indicator'] as INode this.cacheTabItemsSize() this.setSwiperIndex(0, true) }, diff --git a/pages/template/swiper-list/swiper-list.uvue b/pages/template/swiper-list/swiper-list.uvue index 8dcd53782b040af0007df74850ea355a3a6810c7..5aebd6ddce87375014dc4164d66cc067f7941672 100644 --- a/pages/template/swiper-list/swiper-list.uvue +++ b/pages/template/swiper-list/swiper-list.uvue @@ -61,8 +61,8 @@ } }, onReady() { - this.$tabScrollView = this.$refs.get('tabScroll') as INode - this.$indicatorNode = this.$refs.get('indicator') as INode + this.$tabScrollView = this.$refs['tabScroll'] as INode + this.$indicatorNode = this.$refs['indicator'] as INode this.$swiperWidth = (this.$refs["swiper"] as INode).getBoundingClientRect().width this.cacheTabItemsSize() this.setSwiperIndex(0, true) diff --git a/pages/template/swiper-list2/swiper-list2.uvue b/pages/template/swiper-list2/swiper-list2.uvue index 187ca81fad9eef14a25ae34c7810d542e63fb139..d94d7027c7028e34b2184fa080c1376fa088257f 100644 --- a/pages/template/swiper-list2/swiper-list2.uvue +++ b/pages/template/swiper-list2/swiper-list2.uvue @@ -52,7 +52,7 @@ } }, onReady() { - this.$tabScrollView = this.$refs.get('tabScroll') as INode + this.$tabScrollView = this.$refs['tabScroll'] as INode this.$swiperWidth = (this.$refs["swiper"] as INode).getBoundingClientRect().width this.setSwiperIndex(0, true) }, @@ -106,7 +106,7 @@ const min_ratio = 1 const max_ratio = 1.3 - const tabs = this.$refs["swipertab"] as INode[] + const tabs = this.$refs['swipertab'] as INode[] const current_node = tabs[current_index]! const move_to_node = tabs[move_to_index]!