当前位置:网站首页>鸿蒙第四次培训
鸿蒙第四次培训
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: "授权失败!"
});
}
}
另外还有真机调试的问题
有一些预览是展示不出来的,要远程真机调试,
步骤就是注册+登录+
分本地下载和远程两种
然后就可以调整适合的机型了。
边栏推荐
- [combinatorics] recursive equation (definition of general solution | structure theorem of general solution of recursive equation without multiple roots)
- [error reporting] omp: error 15: initializing libiomp5md dll, but found libiomp5md. dll already initialized.
- Hands on in-depth learning notes (XIV) 3.7 Simple implementation of softmax regression
- 大变局!全国房价,跌破万元大关
- How SVN views modified file records
- 29: Chapter 3: develop Passport Service: 12: develop [obtain user account information, interface]; (use VO class to package the found data to meet the requirements of the interface for the returned da
- 新库上线 | CnOpenData中国观鸟记录数据
- Recommendation of good books on learning QT programming
- Talk about several methods of interface optimization
- One brush 149 force deduction hot question-10 regular expression matching (H)
猜你喜欢
Kubernetes resource object introduction and common commands (4)
跨境电商:外贸企业做海外社媒营销的优势
Simple use of unity pen XR grab
【JokerのZYNQ7020】DDS_ Compiler。
[RT thread] NXP rt10xx device driver framework -- Audio construction and use
[error reporting] omp: error 15: initializing libiomp5md dll, but found libiomp5md. dll already initialized.
線程池:業務代碼最常用也最容易犯錯的組件
Talk about several methods of interface optimization
大消费企业怎样做数字化转型?
Build your own website (23)
随机推荐
绝对定位时元素水平垂直居中
Electronic Science and technology 20th autumn "Microcomputer Principle and application" online assignment 2 [standard answer]
One brush 147-force deduction hot question-4 find the median of two positive arrays (H)
Assembly instance analysis -- screen display in real mode
Luogu: p2685 [tjoi2012] Bridge
Kotlin学习快速入门(7)——扩展的妙用
Bcvp developer community 2022 exclusive peripheral first bullet
Leetcode: lucky number in matrix
The way of wisdom (unity of knowledge and action)
Define a structure fraction to represent a fraction, which is used to represent fractions such as 2/3 and 5/6
One brush 144 force deduction hot question-1 sum of two numbers (E)
Select 3 fcpx plug-ins. Come and see if you like them
How to allow remote connection to MySQL server on Linux system?
Pools de Threads: les composants les plus courants et les plus sujets aux erreurs du Code d'affaires
SVN完全备份svnadmin hotcopy
【JokerのZYNQ7020】DDS_ Compiler。
Redis:关于列表List类型数据的操作命令
Kubernetes resource object introduction and common commands (III)
How to promote cross department project collaboration | community essay solicitation
[combinatorics] recursive equation (characteristic equation and characteristic root | example of characteristic equation | root formula of monadic quadratic equation)