html - 带有摄像头捕获的 Vue v-file-input
问题描述
vue中有没有办法从相机获取文件输入,类似于普通的html方法:
<input type="file" accept="image/*" capture="camera" />
我正在寻找这样的东西:
<v-file-input capture="camera" />
解决方案
基于w3 文档,您应该使用capture
withuser
作为值并添加accept
属性:
<v-file-input
label="File input"
outlined
dense
capture="user"
accept="image/*"
></v-file-input>
推荐阅读
- spring-boot - 是否可以仅基于配置文件加载特定的注释?
- mysql - 我应该编写冗长的 SQL 查询还是分解为几个迭代
- swift - 能够在实际设备上运行应用程序但无法调用 API
- java - 为空手道中的每个元素匹配字符串 json 数组响应
- coldfusion - 无法通过 ColdFusion 在浏览器中禁用 HttpOnly 标志
- python - 检查一列中的每个值与一个数据框中其他列的每个值
- sql - Oracle SQL:无法根据多于一列的索引创建外键
- javascript - 如何获取数组
- angular - 特性模块中的延迟加载 - Angular
- spring-boot - Spring Webflux WebExceptionHandler 未被 OptimisticLockingFailure 触发