更新记录
1.0.0(2026-05-30)
自定义摄像头剪辑
平台兼容性
uni-app(4.75)
| Vue2 |
Vue2插件版本 |
Vue3 |
Vue3插件版本 |
Chrome |
Safari |
app-vue |
app-nvue |
app-nvue插件版本 |
Android |
Android插件版本 |
iOS |
鸿蒙 |
| √ |
1.0.0 |
√ |
1.0.0 |
× |
× |
× |
√ |
1.0.0 |
10.0 |
1.0.0 |
× |
× |
| 微信小程序 |
支付宝小程序 |
抖音小程序 |
百度小程序 |
快手小程序 |
京东小程序 |
鸿蒙元服务 |
QQ小程序 |
飞书小程序 |
小红书小程序 |
快应用-华为 |
快应用-联盟 |
| × |
× |
× |
× |
× |
× |
× |
× |
× |
× |
× |
× |
yao-custom-camera
插件必须使用nvue原生渲染页面才能正常显示
封面图示例
<yao-custom-camera
ref="cameraRef"
@photo-taken="onPhotoTaken"
@picture-size="onPictureSize"
class="camera"
:width="360" :height="780" :cropX="20"
:cropY="60"
:cropWidth="200"
:cropHeight="200"
:style="`width:${360}px;height:${780}px;`"></yao-custom-camera>
const cameraRef = ref(null);
//手电筒开关
const onTorch = () => {
cameraRef.value.toggleFlashlight();
}
// 拍照
const onShoot = () => {
cameraRef.value.takePhoto();
}
const onPhotoTaken = (e) => {
image_file_path.value = e.detail;
}
const onPictureSize = (e) => {
console.log("当前摄像头宽高",e);
}