当前位置:网站首页>第四次培训
第四次培训
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组件不跟随转场动画


边栏推荐
- 超好用的画图工具推荐
- 4.如何避免缓存穿透、缓存击穿、缓存雪崩
- Harmony OS ets ArkUI 】 【 】 the development basic page layout and data connection
- 【 Harmony OS 】 【 ano UI 】 lightweight data storage
- Fluorescent marker peptides FITC/AMC/FAM/Rhodamine TAMRA/Cy3 / Cy5 / Cy7 - Peptide
- unity2D横板游戏教程6-敌人AI以及受击动画
- vim命令
- Harmony OS Date ano UI 】 【 】 the basic operation
- 【HMS core】【Ads Kit】Huawei Advertising——Overseas applications are tested in China. Official advertisements cannot be displayed
- DFS对剪枝的补充
猜你喜欢

typescript44-对象之间的类兼容器

Apache DolphinScheduler版本2.0.5分布式集群的安装

Fluorescent marker peptides FITC/AMC/FAM/Rhodamine TAMRA/Cy3 / Cy5 / Cy7 - Peptide

2022/08/02 Study Notes (day22) Multithreading

MCM box model modeling method and source analysis of atmospheric O3

shell script loop statement

typescript39-class类的可见修饰符

Install IIS services (Internet Information Services (Internet Information Services, abbreviated IIS, Internet Information Services)

Peptides mediated PEG DSPE of phospholipids, targeted functional materials - PEG - RGD/TAT/NGR/APRPG

力扣561. 数组拆分
随机推荐
ss-4.1-1个eurekaServer+1个providerPayment+1个consumerOrder
Unity2D horizontal board game tutorial 6 - enemy AI and attack animation
Junit
用户密码加密工具
背压机制
1079 延迟的回文数 (20 分)
Ali cloud object storage oss private barrels to generate links
【精讲】利用原生js实现todolist
Business table analysis - balance system
2017-06-11 Padavan 完美适配newifi mini【adbyby+SS+KP ...】youku L1 /小米mini
3. 无重复字符的最长子串
在树莓派上搭建属于自己的网页(2)
Apache DolphinScheduler版本2.0.5分布式集群的安装
接口测试实战| GET/POST 请求区别详解
typescript42-readonly修饰符
unity2D横板游戏教程6-敌人AI以及受击动画
建立树形结构
shell script loop statement
junit总结
JDBC与连接池