3.7.0 • Published 5 years ago

vue-img-tag v3.7.0

Weekly downloads
14
License
MIT
Repository
github
Last release
5 years ago

vue-img-tag

NPM Version Download Month gzip with dependencies: 2.3kb pkg.module lazyload supported ssr supported

pkg.module supported, which means that you can apply tree-shaking in you project

A simple vue2 component, just for img preview, can be used to image input preview

repository

https://github.com/livelybone/vue-img-tag.git

Demo

https://livelybone.github.io/vue/vue-img-tag/

Example

See: example

Installation

npm i -S vue-img-tag

Global name

VueImgTag

Usage

// import all
import VueImgTag from 'vue-img-tag';

// Global register
Vue.component('img-tag', VueImgTag);

// Local register
new Vue({
  components:{VueImgTag}
})

Props

NameTypeDefaultValueDescription
lazyBooleanfalseEnable lazy mode or not
loadingImgStringnoneCan be url or color(should be rgb, rgba or hex)
errorImgStringnoneDon't set to color, only url allowed
src[String, FileList, File, Promise]none
preventValueNumber0The boundary condition
eventObjectdefaultConfConfig of event which is use to judge whether img should load or not, especially useful when lazy mode is enabled
const defaultConf = {
  eventName: 'scroll', // The event listened to
  eventTarget: window, // what dom do event triggered on
}
3.7.0

5 years ago

3.6.0

5 years ago

3.5.1

5 years ago

3.5.0

5 years ago

3.4.0

5 years ago

3.3.0

5 years ago

3.2.0

5 years ago

3.1.0

5 years ago

3.0.0

6 years ago

2.5.0

6 years ago

2.4.1

6 years ago

2.4.0

6 years ago

2.3.0

6 years ago

2.2.1

6 years ago

2.2.0

6 years ago

2.1.0

6 years ago

2.0.0

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago