A beautiful vue component for upload image with select or drag and drop.
Notice: This component is designed for pc.
IE10+
$ npm i vue-imagen-drag
Name | Type | Default | Description |
---|---|---|---|
id | String | 'image-drag-drop' | Necesary id to component |
height | String,Number | 'auto' | height size of component |
value | String | '' | Image route, return base64File |
<div id="app">
<vue-imagen-drag
height="200px"
v-model="imagen"
/>
</div>
<script>
import Vue from 'vue';
import VueImagenDrag from 'vue-imagen-drag';
new Vue({
el: '#app',
data: {
imagen:''
},
components: {
'vue-imagen-drag': VueImagenDrag
},
});
</script>