倒数第三张图片地址不存在会显示errorPic图片,提前200px载入图片,淡入显示,进入可视区域后执行回调函数
Vue.use(VueViewload, { defaultPic: 'http://img.zcool.cn/community/0161f656b0663e6ac7256cb052d31a.gif', errorPic: 'http://a0.att.hudong.com/77/31/20300542906611142174319458811.jpg', threshold: -200, effectFadeIn: true, callback: function(ele, src) { ele.style.border = '1px solid red'; console.log(ele.nodeName + '...' + src); } })