Files
SkinCamera/uni_modules/Skin-cameraUTS/readme.md
T
2026-03-12 13:55:06 +08:00

52 lines
1023 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# **概述**
Skin-cameraUTS封装了Android和iOS自定义相机预览的功能。
## **模块调用**
```js
<xf-camera style="height:750rpx; background-color: red;" @ready="ready" @error="onError" @stop="stop" :flash="flash" :position="device">
</xf-camera>
```
## 参数说明:
position
- 类型:字符串型
- 描述:(可选项)前置或者后置相机。(front前置 |back 后置)
flash
- 类型:字符串型
- 描述:(可选项)是否开启闪光灯。( auto, on, off, torch)
## **插件接口**
<div id="a0"></div>
# **takePhoto**
拍照
## uni-app x项目(uvue)中调用示例:
```js
import { takePhoto } from "@/uni_modules/Skin-cameraUTS";
import { TakePhotoOption, TakePhotoSuccessCallbackResult } from "@/uni_modules/Skin-cameraUTS/utssdk/interface.uts";
let options = {
success: (res : TakePhotoSuccessCallbackResult) => {
console.log(res)
}
} as TakePhotoOption;
takePhoto(options);
```
## 可用性
iOS、Android系统
可提供的1.0.0及更高版本