Vue lazyload directive

vue-lazyload-directive

Version: 1.0.0 Updated: 03/11/2017

By: shmy License: MIT

Downloads Last 30 Days: 13

支持vuejs(version >= 2.0)图片懒加载 npm npm license GitHub stars

Installation

  • via CDN

    <script src="https://unpkg.com/vue-lazyload-directive/dist/vue-lazyload-directive.min.js"></script>
  • via NPM

    $ npm install vue-lazyload-directive --save # Or
    $ yarn add vue-lazyload-directive
  // main.js
  import Vue from "vue";
  import vueLazyloadDirective from "vue-lazyload-directive";
  Vue.use(vueLazyloadDirective, [options]); // 可选参数

Simple example

See ./test/inedx.html

Categories: Vue js