当前位置:网站首页>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.
边栏推荐
- [dark horse morning post] Shanghai Municipal Bureau of supervision responded that Zhong Xue had a high fever and did not melt; Michael admitted that two batches of pure milk were unqualified; Wechat i
- 7-8 7104 Joseph problem (PTA program design)
- Experiment 9 input and output stream (excerpt)
- 实验八 异常处理
- [MySQL database learning]
- It's never too late to start. The tramp transformation programmer has an annual salary of more than 700000 yuan
- 7-4 hash table search (PTA program design)
- 强化学习基础记录
- Differences among fianl, finally, and finalize
- Renforcer les dossiers de base de l'apprentissage
猜你喜欢
A piece of music composed by buzzer (Chengdu)
[au cours de l'entrevue] - Comment expliquer le mécanisme de transmission fiable de TCP
Experiment 6 inheritance and polymorphism
FAQs and answers to the imitation Niuke technology blog project (II)
A comprehensive summary of MySQL transactions and implementation principles, and no longer have to worry about interviews
MySQL事务及实现原理全面总结,再也不用担心面试
SRC mining ideas and methods
Strengthen basic learning records
Matlab opens M file garbled solution
Meituan dynamic thread pool practice ideas, open source
随机推荐
Record a penetration of the cat shed from outside to inside. Library operation extraction flag
实验七 常用类的使用
Why use redis
[data processing of numpy and pytoch]
Reinforcement learning series (I): basic principles and concepts
7-3 construction hash table (PTA program design)
SRC mining ideas and methods
Write a program to simulate the traffic lights in real life.
HackMyvm靶機系列(3)-visions
7-7 7003 combination lock (PTA program design)
[the Nine Yang Manual] 2021 Fudan University Applied Statistics real problem + analysis
【黑马早报】上海市监局回应钟薛高烧不化;麦趣尔承认两批次纯牛奶不合格;微信内测一个手机可注册俩号;度小满回应存款变理财产品...
实验五 类和对象
7-8 7104 约瑟夫问题(PTA程序设计)
Experiment 7 use of common classes (correction post)
Detailed explanation of redis' distributed lock principle
Wechat applet
Callback function ----------- callback
力扣152题乘数最大子数组
Package bedding of components