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


边栏推荐
- typescript46-函数之间的类型兼容性
- MySql数据库
- Fluorescent marker peptides FITC/AMC/FAM/Rhodamine TAMRA/Cy3 / Cy5 / Cy7 - Peptide
- DFS's complement to pruning
- Unity2D horizontal board game tutorial 6 - enemy AI and attack animation
- The problem that the rosbag tool plotjuggler cannot open rosbag
- FileZilla 搭建ftp服务器
- Business table analysis - balance system
- c语言结构体中的冒泡排序
- Technology Sharing | How to do assertion verification for xml format in interface automation testing?
猜你喜欢

typescript41-class类的私有修饰符

unity2D横板游戏教程6-敌人AI以及受击动画

阿里云对象存储oss私有桶生成链接

接口测试实战| GET/POST 请求区别详解

CAD有生僻字如何打出来、如何提交软件相关问题或建议?

idea uses @Autowired annotation to explain the reasons and solutions

Installation of Apache DolphinScheduler version 2.0.5 distributed cluster

DFS对剪枝的补充

High availability, two locations and three centers

快速上手 Mockito 单元测试框架
随机推荐
Interface test practice | Detailed explanation of the difference between GET / POST requests
Business table analysis - balance system
1054 求平均值 (20 分)
breed Web刷机升级详细教材修正编译器固件说明_itkeji.top
[Harmony OS] [ARK UI] ETS context basic operations
Installation of Apache DolphinScheduler version 2.0.5 distributed cluster
tag单调栈-单调栈预备知识-lt.739. 每日温度
生活原则。
junit总结
minio下载文件乱码或者是一条横线
Shell conditional statement judgment
Presto installation and deployment tutorial
js的垃圾回收机制
Get the Ip tool class
接口管理工具YApi怎么用?颜值高、易管理、超好用
【Harmony OS】【FAQ】Hongmeng Questions Collection 1
Interface test framework combat (1) | Requests and interface request construction
高效率科研神器——小软件、大能量
[Developers must see] [push kit] Collection of typical problems of push service service 2
Interface Test Framework Practice (4) | Get Schema Assertion