判断后台读取的图片是否加载完成
let img = this.$refs.wrapper.getElementsByTagName("img"); let count = 0; let length = img.length; if (length) { let timer = setInterval(() => { if (count == length) { this.scroll.refresh(); //bs提供的刷新的方法,详见官网 clearInterval(timer); } else if (img[count].complete) { count++; } }, 100); }