# Image
# Usage
// Global installation
import ImageInstaller from "vue-elder-image";
//...
Vue.use(ImageInstaller);
// Local installation
import { ImageComponent, setup } from "vue-elder-image";
setup({
//Options
upload(file, onProgress, options) {
/*
Write your custom upload function
Call "onProgress" with a value (0-100) to change the progress
"options" is whatever has been set as uploadOptions prop
*/
},
serialize(val) {
/*
Transform value
Expected format:
/* Value format
{
url: '...',
}
*/
},
dropMessage: "Drag an image here or <b>browse</b> to upload."
});
//...
components: {
ImageComponent;
}
# Slots
- drop-message
# Props
- value
Array | Object | String
- label
String
- sortable
Boolean
- multiple
Boolean
- rename
String | Boolean
- upload
Function
- serialize
Function
- size
String (css: background-size)
- placement
String (outside|inside)
- uploadOptions
Object
# Example
<image-component label="Image" multiple></image-component>
Drag an image here or browse to upload.
<image-component label="Image" multiple placement="inside"></image-component>
Drag an image here or browse to upload.
← File Navigation →