Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/Coffcer/vue-lazy-component
- Owner: Coffcer
- Created: 2016-09-10T10:41:21.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-10-27T02:32:27.000Z (about 8 years ago)
- Last Synced: 2024-08-02T09:24:43.894Z (3 months ago)
- Language: JavaScript
- Homepage: https://coffcer.github.io/vue-lazy-component/
- Size: 512 KB
- Stars: 86
- Watchers: 4
- Forks: 23
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-github-vue - vue-lazy-component - 懒加载组件或者元素的Vue指令 (实用库)
- awesome-github-vue - vue-lazy-component - 懒加载组件或者元素的Vue指令 (实用库)
- awesome - vue-lazy-component - 懒加载组件或者元素的Vue指令 (实用库)
- awesome-vue - vue-lazy-component - lazy-component?style=social) - 懒加载组件或者元素的Vue指令 (实用库)
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
```