Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/Coffcer/vue-lazy-component

Vue directive for lazy load components or elements
https://github.com/Coffcer/vue-lazy-component

Last synced: 6 days ago
JSON representation

Vue directive for lazy load components or elements

Awesome Lists containing this project

README

        

# vue-lazy-component

> Vue directive for lazy load components or elements, lazy load some components which not in the first screen can improve vue initialization performance.

[Live demo](http://coffcer.github.io/vue-lazy-component/)

## Usage

``` javascript
import Vue from 'vue';
import lazy from 'vue-lazy-component';

Vue.use(lazy);
```

``` html


Chlid



```

## Build Setup

``` bash
# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build the component to UMD js
npm run build

# build the dev page
npm run build:demo
```