当前位置:网站首页>鸿蒙第四次培训
鸿蒙第四次培训
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: "授权失败!"
});
}
}
另外还有真机调试的问题
有一些预览是展示不出来的,要远程真机调试,
步骤就是注册+登录+
分本地下载和远程两种
然后就可以调整适合的机型了。
边栏推荐
- SWM32系列教程4-端口映射及串口应用
- 27. 输入3个整数,按从大到小的次序输出。要求用指针方法实现。
- [combinatorics] recursive equation (definition of general solution | structure theorem of general solution of recursive equation without multiple roots)
- Javescript variable declaration -- VaR, let, const
- Redis:关于列表List类型数据的操作命令
- visual studio “通常每个套接字地址(协议/网络地址/端口)只允许使用一次“
- Pools de Threads: les composants les plus courants et les plus sujets aux erreurs du Code d'affaires
- vs code 插件 koroFileHeader
- Capacités nécessaires à l'analyse des données
- New library online | cnopendata complete data of Chinese insurance institution outlets
猜你喜欢
大消费企业怎样做数字化转型?
静态程序分析(一)—— 大纲思维导图与内容介绍
kubernetes资源对象介绍及常用命令(五)-(NFS&PV&PVC)
2021 ICPC regional competition (Shanghai) g.edge groups (tree DP)
kubernetes资源对象介绍及常用命令(三)
Network security web penetration technology
PHP online confusion encryption tutorial sharing + basically no solution
The largest matrix (H) in a brush 143 monotone stack 84 histogram
Unity notes unityxr simple to use
[error reporting] omp: error 15: initializing libiomp5md dll, but found libiomp5md. dll already initialized.
随机推荐
Why is WPA3 security of enterprise business so important?
PS screen printing brush 131, many illustrators have followed suit
The way of wisdom (unity of knowledge and action)
C语言字符串反转
Luogu: p1155 [noip2008 improvement group] double stack sorting (bipartite graph, simulation)
A day's work list of an ordinary programmer
静态程序分析(一)—— 大纲思维导图与内容介绍
[RT thread] NXP rt10xx device driver framework -- Audio construction and use
How to delete a specific line from a text file using the SED command?
Prepare for the golden three silver four, 100+ software test interview questions (function / interface / Automation) interview questions. win victory the moment one raises one 's standard
Answer to the homework assessment of advanced English reading (II) of the course examination of Fuzhou Normal University in February 2022
BYD and great wall hybrid market "get together" again
How to judge the region of an IP through C?
C language modifies files by line
跨境电商:外贸企业做海外社媒营销的优势
Visual studio "usually, each socket address (Protocol / network address / port) can only be used once“
Design e-commerce spike
Assembly instance analysis -- screen display in real mode
[JDBC] API parsing
[2. Basics of Delphi grammar] 1 Identifiers and reserved words