效果:
index.html:
vue:
getImgs: function() { //created中调用
let _this = this;
_this.axios.get('请求链接').then(function(res) {
if (res.status === 200 && res.data.result === "0") {
let data =res.data.message.list;
for (let i indata) {
_this.scrollArr.push(data[i]);
}
_this.scrollLength =_