https://www.antdv.com/components/upload-cn/#%E7%82%B9%E5%87%BB%E4%B8%8A%E4%BC%A0
<a-upload
accept=".yml,.json"
name="file"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
:headers="headers"
@change="handleChange"
:file-list=[]
>
:file-list设置为空数组 上传时可以隐藏上传列表 ,设置为空后发现 调用函数里面获取不了东西,最后是再写了个标签去触发这个组件(把组件隐藏起来)
accept=".yml,.json" 控制只能上传什么文件
后计:
要控制上传时不展示上传列表 直接有api控制的

<a-upload
:showUploadList="false"
:customRequest="e => uploadImage(e,record.id)" -------------------穿2个参数的方法
:multiple="true"
:headers="headers"
>