在使用ant design vue组件的上传组件AUpload的时候有一个问题,直接按照demo写,在ios上会唤起相机,但是实际上我们的需求是弹出选择相册/相机这个弹框。
解决办法是加一个 cupture="null"这个属性即可
<a-upload:capture="null"accept=".png,.jpg,jpeg"@change="handleImgChange"
>点击上传
</a-upload>
HTML attribute: capture - HTML: HyperText Markup Language | MDNThe capture attribute specifies that, optionally, a new file should be captured, and which device should be used to capture that new media of a type defined by the accept attribute.https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/capture