Closed chentianxin closed 8 months ago
uni vue2 微信小程序项目 在uv-vtabs.vue中 初始化了childrencreated() { this.children = [] }, 之后children就没重新赋值了,导致点击左边的item数组越界访问clickHandler方法中this.contentScrollTop = this.children[currentIndex].top - this.$uv.getPx(this.hdHeight) - Math.random() * 4 - 4;但是this.children是空数组
uv-vtabs.vue
created() { this.children = [] },
clickHandler
this.contentScrollTop = this.children[currentIndex].top - this.$uv.getPx(this.hdHeight) - Math.random() * 4 - 4;
uni vue2 微信小程序项目 在
uv-vtabs.vue
中 初始化了childrencreated() { this.children = [] },
之后children就没重新赋值了,导致点击左边的item数组越界访问clickHandler
方法中this.contentScrollTop = this.children[currentIndex].top - this.$uv.getPx(this.hdHeight) - Math.random() * 4 - 4;
但是this.children是空数组