从后台请求数据html
请求的数据携带有一段html,里面还有图片,也须要另外加载。ios
问题是图片加载一半会很慢,页面加载完成会要等一会,使用了better-scrollaxios
activated () { let id = this.$route.params ? this.$route.params.id : null if (id) { axios.get('/product/detail.do?productId=' + id).then((res) => { this.data = res.data.data console.log(this.data) this.data.subImages = this.data.subImages.split(',') this.swiper.slideTo(0, 0, false) this.$nextTick(() => { if (!this.scroll) { this.scroll = new BScroll(this.$refs.list, { click: true }) } else { this.scroll.refresh() } }) }) } }
图片未所有加载完成的时候 不能滚动页面ide
未能解决this