当前位置:网站首页>Harmonyos JS demo application development
Harmonyos JS demo application development
2022-07-06 13:58:00 【Big 1234 grass】
List of articles
Preface
Under the experience "HarmonyOS JS Demo application development ".
Video tutorial :HarmonyOS JS Demo application development
Source warehouse :harmonyos_app_samples
Not yet HarmonyOS Structural understanding , If you need to know , You can refer to Official documents .
In the link above demo, From the perspective of application developers , In general :html According to the content ,css Control style ,JavaScript For interactive .
Because the warehouse code uses Apache License 2.0, It can be copied here / Modify some codes in the warehouse for notes , See warehouse for complete code .
brief introduction :
This example is suitable for introducing how to develop a JS Demo application .
This application is shown by an example of a list JS Interface layout and logic implementation in the process of application development .
Show the list of schedules on the application page , The list item consists of the item name 、 Time 、 The degree of urgency consists of . It supports checking and deleting the event list .
matters needing attention
The code is easy to understand . Here we just look at how one element in the list is laid out .
Because my front end is more delicious , So here's the layout .
html The code is as follows :
<div class="container">
<text class="title">
{
{ $t('strings.hello') }} {
{ title }}
</text>
<list>
<list-item for="{
{todayList}}" class="todo-list-item">
<image class="todo-image-left" src="{
{$item.checkBtn}}" onclick="completeEvent({
{$item.id}})"></image>
<div class="todo-item flex-row">
<div class="todo-name-mark">
<text class="todo-name">{
{$item.event}}</text>
<text class="todo-mark {
{$item.tag}}"></text>
</div>
<text class="todo-time">{
{$item.time}}</text>
</div>
<image class="todo-image-right" src="/common/images/delete.png" onclick="deleteEvent({
{$item.id}})" show="{
{$item.completeState}}"></image>
</list-item>
</list>
</div>
The effect is as follows :

[1] " Appointment "event and " Small yellow dot "tag In a div( It's called div1 Well ) in .
[2] "14:30"time and div1, In the larger div2( It's called div2 Well ) in . Use Flex Layout up and down .
[3] ️、 and div2, For one list-item.
边栏推荐
- [MySQL database learning]
- 7-5 staircase upgrade (PTA program design)
- Have you encountered ABA problems? Let's talk about the following in detail, how to avoid ABA problems
- Experiment 8 exception handling
- HackMyvm靶机系列(3)-visions
- FAQs and answers to the imitation Niuke technology blog project (III)
- 7-7 7003 combination lock (PTA program design)
- [hand tearing code] single case mode and producer / consumer mode
- 扑克牌游戏程序——人机对抗
- Redis实现分布式锁原理详解
猜你喜欢

强化学习基础记录

强化学习系列(一):基本原理和概念

FAQs and answers to the imitation Niuke technology blog project (I)

It's never too late to start. The tramp transformation programmer has an annual salary of more than 700000 yuan

FAQs and answers to the imitation Niuke technology blog project (II)

Matlab opens M file garbled solution

Have you encountered ABA problems? Let's talk about the following in detail, how to avoid ABA problems

实验六 继承和多态

Mode 1 two-way serial communication is adopted between machine a and machine B, and the specific requirements are as follows: (1) the K1 key of machine a can control the ledi of machine B to turn on a

HackMyvm靶机系列(5)-warez
随机推荐
7-5 走楼梯升级版(PTA程序设计)
仿牛客技术博客项目常见问题及解答(一)
[hand tearing code] single case mode and producer / consumer mode
Relationship between hashcode() and equals()
【黑马早报】上海市监局回应钟薛高烧不化;麦趣尔承认两批次纯牛奶不合格;微信内测一个手机可注册俩号;度小满回应存款变理财产品...
7-15 h0161. 求最大公约数和最小公倍数(PTA程序设计)
深度强化文献阅读系列(一):Courier routing and assignment for food delivery service using reinforcement learning
Brief introduction to XHR - basic use of XHR
Have you encountered ABA problems? Let's talk about the following in detail, how to avoid ABA problems
Experiment 4 array
1143_ SiCp learning notes_ Tree recursion
[MySQL table structure and integrity constraint modification (Alter)]
7-9 制作门牌号3.0(PTA程序设计)
[modern Chinese history] Chapter 9 test
Canvas foundation 1 - draw a straight line (easy to understand)
7-7 7003 组合锁(PTA程序设计)
1. Preliminary exercises of C language (1)
强化学习基础记录
7-7 7003 combination lock (PTA program design)
HackMyvm靶机系列(6)-videoclub