v-uploader基于 Vue2 的文件上傳插件
v-uploader
基于 Vue2 簡潔易用,可批量、拖拽的文件上傳插件。
Demo、文檔
請瀏覽
插件預(yù)覽
帶圖片預(yù)覽的單文件上傳

批量上傳文件可進行拖拽

安裝
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: 'http://xxx/upload',
deleteFileUrl: 'http://xxx/delete',
showMessage: (vue, message) => {
//using v-dialogs to show message
vue.$vDialog.alert(message, null, {messageType: 'error'});
}
}
};
//install plugin with params
Vue.use(vUploader, uploaderConfig);
There is using v-dialogs to show message in example
Depend on
評論
圖片
表情
