0.0.4 • Published 11 months ago

draggable-vue-uploader v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

draggable-vue-uploader

English | 简体中文

A simple image uploader component that supports drag-and-drop sorting of image lists.

If this project helps you, please give it a star!

Supports Vue 3

Installation

npm i draggable-vue-uploader

Usage

import DraggableUploader from 'draggable-vue-uploader';
import 'draggable-vue-uploader/dist/style.css'

createApp(App).use(DraggableUploader).mount('#app')

Example

demo

Run demo

cd example

npm run i

npm run dev

Documentation

Props

PropDescriptionTypeDefault
actionThe URL for uploading.string-
headersThe header information for uploading requests.{key: value}-
fileListThe list of files.FileItem[]-
maximumThe maximum number of uploads for the list.number10
before-uploadTriggered before uploading files.(file: File) => boolean\| Promise-

Events

EventDescriptionParameters
changeTriggered when the file status changes.fileList: FileItem[]fileItem: fileItem
progressUpload file progress bar.fileItem: fileItemprogress: progress
successTriggered when the upload is successful.fileItem: fileItemresult: result
errorTriggered when the upload fails.fileItem: FileItemerror: error

To-do

  • Basic functionality
  • Image preview
  • Package release
  • Animation
  • Complete API
0.0.4

11 months ago

0.0.3

12 months ago

0.0.2

12 months ago

0.0.1

12 months ago