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


边栏推荐
- 1089 狼人杀-简单版 (20 分)
- 斐讯K2路由编译Padavan华硕固件和心得
- 接口测试框架实战(四)| 搞定 Schema 断言
- [Harmony OS] [ArkUI] ets development graphics and animation drawing
- odps的临时查询能在写sql的时候就给结果一个命名不?
- 在树莓派上搭建属于自己的网页(1)
- Kotlin-Flow common encapsulation class: the use of StateFlow
- Common fluorescent dyes to modify a variety of groups and its excitation and emission wavelength data in the data
- Where is the value of testers
- BIOTIN ALKYNE CAS: 773888-45-2 Price, Supplier
猜你喜欢

13.< tag-动态规划和回文字串>lt.647. 回文子串 + lt.516.最长回文子序列

typescript46-函数之间的类型兼容性

Modified BiotinDIAZO-Biotin-PEG3-DBCO|diazo-biotin-tripolyethylene glycol-diphenylcyclooctyne

Kotlin-Flow常用封装类:StateFlow的使用

Interface Test Framework Practice (4) | Get Schema Assertion

idea使用@Autowired注解爆红原因及解决方法

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

FileZilla 搭建ftp服务器

Talking about GIS Data (5) - Geographic Coordinate System

typescript39-class类的可见修饰符
随机推荐
Common fluorescent dyes to modify a variety of groups and its excitation and emission wavelength data in the data
斐讯K2路由编译Padavan华硕固件和心得
Kotlin-Flow常用封装类:StateFlow的使用
odps的临时查询能在写sql的时候就给结果一个命名不?
GIS数据漫谈(六)— 投影坐标系统
BIOTIN ALKYNE CAS: 773888-45-2 Price, Supplier
Technology Sharing | How to do assertion verification for xml format in interface automation testing?
Js学习笔记(四)
接口和抽象
2022/08/02 学习笔记 (day22) 多线程
安装IIS服务(Internet信息服务(Internet Information Services,简写IIS,互联网信息服务)
接口测试 Mock 实战(二) | 结合 jq 完成批量化的手工 Mock
信息编码、存储压缩与密码学
探索性测试的概念及方法
ss-4.2 多个eureka集群案例
如何不耍流氓的做运维之-SHELL脚本
Interface test practice | Detailed explanation of the difference between GET / POST requests
minio下载文件乱码或者是一条横线
设计模式——组合模式、享元模式(Integer缓存)(结构型模式)
Flink状态