<el-upload
class="creater-cfl-upload"
:action="baseUrl"
:http-request="handleCustomRequest"
:on-progress="handleFileUploadProgress"
:limit="1"
:show-file-list="false"
:file-list="[]"
:on-exceed="handleExceed"
>
<el-button size="small" type="primary">
<i class="el-icon-upload2"></i>
upload
</el-button>
</el-upload>
- 必须填写action,否则会有报错
- limit选择1,且不展示filelist的情况下,需要将filelist永远传空,否则会触发超出限制的钩子。