<el-upload
class="upload-demo"
ref="upload"
:action="action"
:on-change="handlePreview"
:on-remove="handleRemove"
:file-list="fileList"
:auto-upload="false">
<el-button slot="trigger" size="small" type="primary">导入</el-button>
<!-- <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button> -->
</el-upload>
handlePreview(event, file, fileList) {
const param = new FormData()
param.append('file', notUndefined(file[0].raw))
uploadDictBank(param).then(res => {
this.$message({
message: res.message,
type: 'success'
})
})
}