前端(使用了bootstrap-vue框架):
<div style="text-align: left;">
<b-button size="md" pill variant="outline-primary" class="mt-2" @click="openFileWindow()"><span
class="fa fa-plus"></span> 上传附件</b-button>
</div>
<input @change="uploadFile($event)" type="file" ref="fileuploader" style="display: none;"
accept="image/*, audio/*,video/*" />
<!--以下为回显文件,包括图片、视频两种类型-->
<div>
<div v-for="(file,index) in form.fileList" :key="index">
<b-img v-if="file.includes('.jpg') || file.includes('.png')" thumbnail fluid
:src="'http://127.0.0.1/static/uploadImg/'+file" height=