当前位置:网站首页>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.
边栏推荐
- [面試時]——我如何講清楚TCP實現可靠傳輸的機制
- 7-5 staircase upgrade (PTA program design)
- Matlab opens M file garbled solution
- 透彻理解LRU算法——详解力扣146题及Redis中LRU缓存淘汰
- 中间件漏洞复现—apache
- Strengthen basic learning records
- Beautified table style
- 7-7 7003 combination lock (PTA program design)
- Canvas foundation 1 - draw a straight line (easy to understand)
- 7-14 错误票据(PTA程序设计)
猜你喜欢

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

仿牛客技术博客项目常见问题及解答(二)

2022 Teddy cup data mining challenge question C idea and post game summary

附加简化版示例数据库到SqlServer数据库实例中

自定义RPC项目——常见问题及详解(注册中心)

强化学习基础记录

. How to upload XMIND files to Jinshan document sharing online editing?

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

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

About the parental delegation mechanism and the process of class loading
随机推荐
实验五 类和对象
7-9 make house number 3.0 (PTA program design)
SRC挖掘思路及方法
Miscellaneous talk on May 27
PriorityQueue (large root heap / small root heap /topk problem)
(original) make an electronic clock with LCD1602 display to display the current time on the LCD. The display format is "hour: minute: Second: second". There are four function keys K1 ~ K4, and the fun
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 (I)
[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
MySQL事务及实现原理全面总结,再也不用担心面试
1. First knowledge of C language (1)
Detailed explanation of redis' distributed lock principle
7-8 7104 约瑟夫问题(PTA程序设计)
中间件漏洞复现—apache
MySQL lock summary (comprehensive and concise + graphic explanation)
Leetcode.3 无重复字符的最长子串——超过100%的解法
【手撕代码】单例模式及生产者/消费者模式
js判断对象是否是数组的几种方式
HackMyvm靶机系列(3)-visions
7-14 错误票据(PTA程序设计)