当前位置:网站首页>鸿蒙第四次培训
鸿蒙第四次培训
2022-07-03 17:15:00 【沂安】
本次开发主要讲述的是拍照功能的实现
主要利用了:
camera组件
官方文档里面有:
以下为相关示例:
<!-- xxx.hml-->
<div class="container">
<camera flash="on" deviceposition="back" @error="cameraError">
</camera>
</div>/* xxx.css */
.container {
display: flex;
justify-content: center;
align-items: center;
}
camera{
width: 300px;
height: 300px;
}//xxx.js
import prompt from '@system.prompt';
export default {
data: {
title: 'World'
},
cameraError(){
prompt.showToast({
message: "授权失败!"
});
}
}另外还有真机调试的问题
有一些预览是展示不出来的,要远程真机调试,
步骤就是注册+登录+
分本地下载和远程两种
然后就可以调整适合的机型了。
边栏推荐
- C language string practice
- 网络硬盘NFS的安装与配置
- HP 阵列卡排障一例
- ANOVA example
- Pools de Threads: les composants les plus courants et les plus sujets aux erreurs du Code d'affaires
- 数仓任务里面 跑SQL任务的时候用的数据库账号是在哪里配置的
- Rsync远程同步
- 【RT-Thread】nxp rt10xx 设备驱动框架之--rtc搭建和使用
- 美团一面:为什么线程崩溃崩溃不会导致 JVM 崩溃
- 2021 ICPC regional competition (Shanghai) g.edge groups (tree DP)
猜你喜欢

新库上线 | CnOpenData中国保险机构网点全集数据

Why is WPA3 security of enterprise business so important?

Is AI too slow to design pictures and draw illustrations? 3 sets of practical brushes to save you

New features of C 10

Redis: operation commands for list type data

New library online | cnopendata complete data of Chinese insurance institution outlets

免费数据 | 新库上线 | CnOpenData中国保险中介机构网点全集数据

Unity notes unityxr simple to use

Kubernetes resource object introduction and common commands (III)

SWM32系列教程4-端口映射及串口应用
随机推荐
29:第三章:开发通行证服务:12:开发【获得用户账户信息,接口】;(使用VO类包装查到的数据,以符合接口对返回数据的要求)(在多处都会用到的逻辑,在Controller中可以把其抽成一个共用方法)
Bcvp developer community 2022 exclusive peripheral first bullet
Vs code plug-in korofileheader
HP 阵列卡排障一例
Javescript variable declaration -- VaR, let, const
Take you to API development by hand
Kotlin learning quick start (7) -- wonderful use of expansion
Squid 服务启动脚本
Life is still confused? Maybe these subscription numbers have the answers you need!
Deep understanding of grouping sets statements in SQL
[2. Basics of Delphi grammar] 2 Object Pascal data type
[RT thread] construction and use of --hwtimer of NXP rt10xx device driver framework
美团一面:为什么线程崩溃崩溃不会导致 JVM 崩溃
Leetcode13. Roman numeral to integer (three solutions)
Select 3 fcpx plug-ins. Come and see if you like them
One brush 142 monotone stack next larger element II (m)
LeetCode 1658. Minimum operand to reduce x to 0
Apache服务挂起Asynchronous AcceptEx failed.
C语言按行修改文件
One brush 149 force deduction hot question-10 regular expression matching (H)