插件位址:https://github.com/hilongjw/vue-lazyload
demo:http://hilongjw.github.io/vue-lazyload/
1、安裝
2、使用
main.js
import VueLazyLoad from 'vue-lazyload'
Vue.use(VueLazyLoad, {
error:'/static/error.png',
loading: '/static/loading.png'
})
需要懶加載的圖檔
參數說明:
https://segmentfault.com/a/1190000011672452