使用了这两个插件lazy-load-imgvue-lazy-load-img当有新数据替换掉原有的goodsList后,懒加载的图片不变,不知道怎么处理<div v-for="item in goodsList"> <vue-lazy-load-img mode="diy" :time="50" :complete="true" :position="{ top: 0, right: 0, bottom: 0, left: 0 }" :diy="{ backgroundSize: 'cover', backgroundRepeat: 'no-repeat', backgroundPosition: 'center center' }" @before="before" @success="success" @error="error"> <img :src="'../image/load-img.png'" :data-src="item.thumb_img"> </vue-lazy-load-img></div> <script src="../script/lazy-load-img.js"></script><script src="../script/vue-lazy-load-img.js"></script>data: { goodsList: []}
添加回答
举报
0/150
提交
取消