当前位置:网站首页>第四次培训
第四次培训
2022-08-03 05:10:00 【曲水流觞683】
本次开发主要讲述的是拍照功能的实现
主要利用了:
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: "授权失败!"
});
}
}
web组件
首先要添加权限列表:ohos.permission.INTERNET
一个页面只支持一个web组件,会全屏显示,若页面中还有其他组件,会被web组件覆盖,web组件不跟随转场动画


边栏推荐
- 集合框架知识
- vim命令
- shell script loop statement
- Build your own web page on the Raspberry Pi (2)
- Detailed explanation of MOSN reverse channel
- 力扣561. 数组拆分
- How to use the interface management tool YApi?Beautiful, easy to manage, super easy to use
- Apache DolphinScheduler版本2.0.5分布式集群的安装
- 高可用 两地三中心
- Common fluorescent dyes to modify a variety of groups and its excitation and emission wavelength data in the data
猜你喜欢
![[Harmony OS] [ARK UI] ETS context basic operations](/img/40/d5924477c42e2b3246eb212f4be534.png)
[Harmony OS] [ARK UI] ETS context basic operations

在树莓派上搭建属于自己的网页(1)

Newifi路由器第三方固件玩机教程,这个路由比你想的更强大以及智能_Newifi y1刷机_smzdm

Power button 561. An array of split

Two ways to simulate multi-user login in Jmeter

设计模式——组合模式、享元模式(Integer缓存)(结构型模式)

Install PostgreSQL on Windows

超好用的画图工具推荐

Coordinate knowledge in digital twin campus scenarios

FileZilla 搭建ftp服务器
随机推荐
C# async and multithreading
MCM box model modeling method and source analysis of atmospheric O3
typescript44-对象之间的类兼容器
如何不耍流氓的做运维之-SHELL脚本
高可用 两地三中心
typescript41-class类的私有修饰符
Newifi路由器第三方固件玩机教程,这个路由比你想的更强大以及智能_Newifi y1刷机_smzdm
建造者模式(Builder Pattern)
BIOTIN ALKYNE CAS: 773888-45-2 Price, Supplier
获取Ip工具类
1054 求平均值 (20 分)
阿里云对象存储oss私有桶生成链接
13.< tag-动态规划和回文字串>lt.647. 回文子串 + lt.516.最长回文子序列
Build your own web page on the Raspberry Pi (2)
1089 狼人杀-简单版 (20 分)
Business table analysis - balance system
[Harmony OS] [ARK UI] ETS context basic operations
Odps temporary query can write SQL, turned out to a named?
4.如何避免缓存穿透、缓存击穿、缓存雪崩
breed Web刷机升级详细教材修正编译器固件说明_itkeji.top