Skip to content

eret9616/vue-img-uploader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue-img-uploader

picture

Installation

npm install vue-img-uploader 

Use

import Vue from 'vue'
import loader from 'vue-img-uploader'

Vue.use(loader)

Get Start

<template>
  <div>
    <loader :config='config' :output='output'/>
  </div>
</template>

<script>
export default{
    data(){
      return{
          output:[],
          config:{
            ext:'',
            size:function(s){},
            width:function(w){},
            height:function(h){}
          }
      }
    }
}
</script>

Props

ouputs:
An array to storage input files
ext:
Image extention name,eg:'png','jpg'..
size,width,height:
A function that handle the input image file's size/width/height,
To interrupt the input process,"return false" in these functions

More

Check source code to customize your css style
Use this.$refs.[ref].reset( ) to clear thumb-image manually

License

MIT

Releases

No releases published

Packages

No packages published