ant-design-vue在ios使用AUpload组件唤起了相机,HTML的 `capture` 属性

在使用ant design vue组件的上传组件AUpload的时候有一个问题,直接按照demo写,在ios上会唤起相机,但是实际上我们的需求是弹出选择相册/相机这个弹框。

解决办法是加一个 cupture="null"这个属性即可

html 复制代码
<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

相关推荐
MgArcher1 分钟前
抖音a_bogus参数逆向实战:JSVMP环境模拟与Hook技术(2025最新)
javascript·爬虫·python
用户921080262864 分钟前
ChatComposer 输入区改造:基于技能市场实现 Agent 输入框
前端
用户45989204565166 分钟前
一套 KMP 多仓库版本治理工作流:用 Version Catalog + CI 把发版流水线自动化
前端·kotlin
小赵同学WoW7 分钟前
1-4 TypeScript 中的 `number`、`bigint` 与 `string`
前端
小赵同学WoW12 分钟前
1-3 `boolean` 与字面量类型
前端
光影少年15 分钟前
react navite 长列表优化:FlatList / SectionList 原理与优化属性
前端·react native·react.js
cindershade15 分钟前
鼠标 3D 倾斜卡片
前端
wordbaby16 分钟前
从双端内卷到一库多端:基于 pnpm + Taro 4 + RNOH 鸿蒙的 Monorepo 跨端架构实战
前端·微信小程序·app
子兮曰25 分钟前
DeepSeek Harness 架构深潜:一个把 Agent 运行时做成纯插件树的开源 Harness
前端·后端·deepseek
子兮曰1 小时前
AI Agent 完整入门指南:从 LLM 到生产落地的 30+ 个核心概念
前端·后端·agent