Element_UI的el-upload通过change方法上传出现2次请求与请服务器地址报错405处理
<el-upload
:show-file-list="false"
action="#"
:on-change="uploadSectionFile"
>
<img
src="@/images/upload.png"
alt=""
style="cursor: pointer"
/>
</el-upload>
上述代码,就会出现请求两次上传接口问题并且额外请求一次服务器地址。(如图所示)
此时,我们只需要添加 :auto-upload=“false” 在el-upload中即可解决这个问题!