npm下载插件 npm install vue-upload-component -S
在组件中引入 import FileUpload from "vue-upload-component/src";
<file-upload
ref="upload"
v-model="files"
:drop="true"
:extensions="['jpeg', 'png', 'mp4']"
:headers="{'Content-Type':'multipart/form-data'}"
post-action="http://39.105.205.66:8090/task/newUpload"
@input-file="inputFile"
@input-filter="inputFilter"
style="background:#F7F8F8"
>
<button>点击上传</button>
</file-upload>
inputFile: function(newFile, oldFile) {
this.$refs.upload.active = true;
console.log(newFile, oldFile);
if (newFile &