• Stars
    star
    204
  • Rank 192,063 (Top 4 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 4 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Lazy load plugin for Vue 3.x

vue3-lazy

Status: Alpha.

Lazy load plugin for Vue 3.x inspired by vue-lazyload.

This plugin support very simple options, and easy to use.

Install

$ npm install vue3-lazy -S

Usage

main.js:

import { createApp } from 'vue'
import App from './app'
import lazyPlugin from 'vue3-lazy'

const app = createApp(App)
app.use(lazyPlugin, {
  loading: 'loading.png',
  error: 'error.png'
})
app.mount('#app')

template:

<ul>
  <li v-for="img in list">
    <img v-lazy="img.src" >
  </li>
</ul>

Lazy Options

key description default options
error src of the image upon load fail 'data-src' String
loading src of the image while loading 'data-src' String

More Repositories

1

better-scroll

📜 inspired by iscroll, and it supports more features and has a better scroll perfermance
TypeScript
16,468
star
2

vue-analysis

👍 Vue.js 源码分析
JavaScript
7,536
star
3

vue-sell

🍚 Vue.js高仿饿了么外卖App课程源码 http://coding.imooc.com/class/74.html
Vue
3,451
star
4

picker

[警告]该库作者不再维护,picker 的维护移交至 cube-ui
JavaScript
861
star
5

lyric-parser

lyric-parser base on javascript
JavaScript
520
star
6

storage

a storage lib which support sessionStorage and localStorage with the same api
JavaScript
472
star
7

animation

an common animation lib
JavaScript
318
star
8

resume

My resume implement by Vue.js
JavaScript
201
star
9

vue-3.x-demos

Demos implement by vue 3.x
TypeScript
96
star
10

time-picker

a time picker which experience like IOS written by javascript
JavaScript
54
star
11

FunnyRabbit

基于Cocos2djs开发的有趣的兔子接月饼小游戏
JavaScript
44
star
12

Cocos2djs-2048

基于cocos2djs 引擎实现的2048小游戏
JavaScript
38
star
13

Proxy-vs-DefineProperty

Proxy and Objet.defineProperty performance comparison.
JavaScript
14
star
14

gulp-her-webapp

基于gulp编译工具和smarty plugin开发的一套前端集成解决方案
PHP
14
star
15

vue-picker

Vue picker for mobile webapp, inspired by ios UIPickerView
JavaScript
13
star
16

vue2.0-resource

收集整理所有和vue2.0相关的资源
9
star
17

slotMachine

a slotMachine base on jQuery ui widget
JavaScript
9
star
18

gulp-inline-js

在js文件中嵌入其它js文件,支持递归嵌入
JavaScript
4
star
19

ustbhuangyi

About me
3
star
20

vue3-keep-alive-issue

Sub RouterView component will render multiple times when using with KeepAlive
Vue
3
star
21

SortAlgorithm

sort algorithm via js
JavaScript
2
star
22

ball-test

A Drop Ball Demo with BUG
Vue
1
star
23

vue-test-utils-demo

Demo of https://github.com/vuejs/vue-test-utils/pull/1716
Vue
1
star