vue-media-simple-manager
v1.0.7
Published
a simple media manager build with Vue.js 2.0.
Downloads
8
Readme
Vue Media Simple Manager
simple media mananger build with Vue.js 2.0.
Intro
you can use these Vue components provided by Vue Media Simple Manager to handle images uploading and manage uploaded images, including editing the alt
and title
of the images.
Demo
Installation
$ npm i vue-media-simple-manager
How to use
Register the components:
import { MediaGallery, MediaUploader } from 'vue-media-simple-manager'
export default {
components: {
MediaGallery, MediaUploader
}
}
Components Usage
the components require these props and defined methods:
MediaUploader
- Props
- Methods
MediaGallery
- Props
- Methods
Data Format of Media
Each of your media should match the following format:
So, each of media Object would be like this:
{
id: 1,
title: "my stunning image"
url: "https://example.com/api/image_01.jpg",
alt: "image_01"
}
Example of Usage
<template>
<div>
<media-uploader @uploadMedia="createMedia" :apiUrl="apiUrl"/>
<media-gallery
:medias="medias"
@deleteMutiMedias="deleteMutiMedias"
@deleteMedia="deleteMedia"
@updateMedia="updateMedia"
/>
</div>
</template>
Full example is here.