ionic-framework - 离子电容器:如何从相机选项中限制图库?
解决方案
默认情况下,相机插件会提示,但您可以通过传递源属性来选择相机或画廊
// The source to get the photo from. By default this prompts the user to select either the photo album or take a photo. Default: CameraSource.Prompt
source ?: CameraSource;
完整示例:
const image = await Camera.getPhoto({
quality: 90,
resultType: CameraResultType.Uri,
source: CameraSource.Camera
});
推荐阅读
- android - 使用 Retrofit 时安装 SSL 证书
- java - 如何格式化十进制数精度
- json - Angular - Json POST 另一个表键
- ruby-on-rails - 活动模型序列化器对象不返回所有关联记录(有很多:通过关系)
- json - 使用 jq 过滤 json 数据中对象键的更短结构
- r - 具有单个类别的多个几何图形的图例
- gradle - 如何将 makefile 目标修复为 gradle 目标?
- neo4j - 关系问题
- c# - 怎么只能在边界外实现发光效果?
- react-native - 如何在 Reactnative 应用程序的测试自动化中重用步骤定义和页面对象?