tlpment-ui
v1.1.5
Published
基于 vue-cli3 的 UI 组件库
Downloads
3
Readme
Vue-Lazyload
[TOC]
Requirements
Vue.js 1.x or 2.x
Installation
npm
npm i vue-lazyload -S
yarn
yarn add vue-lazyload
Demo
main.js
import Vue from 'vue'
import App from './App.vue'
import VueLazyload from 'vue-lazyload'
Vue.use(VueLazyload)
// or with options
const loadimage = require('./assets/loading.gif')
const errorimage = require('./assets/error.gif')
Vue.use(VueLazyload, {
preLoad: 1.3,
error: errorimage,
loading: loadimage,
attempt: 1
})
new Vue({
el: 'body',
components: {
App
}
})