vue-img-uploader
npm install vue-img-uploader
import Vue from 'vue'
import loader from 'vue-img-uploader'
Vue.use(loader)
<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>
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
Check source code to customize your css style
Use this.$refs.[ref].reset( ) to clear thumb-image manually
MIT