基于Vue2简洁易用,可批量、拖拽的文件上传插件。
Demo、文档请浏览
Englishsite
国内站点
插件预览带图片预览的单文件上传
批量上传文件可进行拖拽
安装npm i v-uploader --save在项目入口 main.js 文件中进行引用
import Vue from 'vue'import vUploader from 'v-uploader';/** * v-uploader plugin global config */const uploaderConfig = () => { return { uploadFileUrl: 'https://xxx/upload', deleteFileUrl: 'https://xxx/delete', showMessage: (vue, message) => { //using v-dialogs to show message vue.$vDialog.alert(message, null, {messageType: 'error'}); } }};//install plugin with paramsVue.use(vUploader, uploaderConfig);Thereisusing v-dialogs toshowmessageinexample
Dependonfine-uploader
holderjs
评论