当前位置:网站首页>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.
边栏推荐
- [au cours de l'entrevue] - Comment expliquer le mécanisme de transmission fiable de TCP
- It's never too late to start. The tramp transformation programmer has an annual salary of more than 700000 yuan
- 仿牛客技术博客项目常见问题及解答(一)
- 强化学习基础记录
- Simply understand the promise of ES6
- 7-5 走楼梯升级版(PTA程序设计)
- [the Nine Yang Manual] 2020 Fudan University Applied Statistics real problem + analysis
- Differences among fianl, finally, and finalize
- MySQL锁总结(全面简洁 + 图文详解)
- Record a penetration of the cat shed from outside to inside. Library operation extraction flag
猜你喜欢
随机推荐
Principles, advantages and disadvantages of two persistence mechanisms RDB and AOF of redis
Wechat applet
About the parental delegation mechanism and the process of class loading
Simply understand the promise of ES6
. Net6: develop modern 3D industrial software based on WPF (2)
HackMyvm靶机系列(4)-vulny
【Numpy和Pytorch的数据处理】
Using qcommonstyle to draw custom form parts
Get started with typescript
【手撕代码】单例模式及生产者/消费者模式
【MySQL-表结构与完整性约束的修改(ALTER)】
Experiment 6 inheritance and polymorphism
FAQs and answers to the imitation Niuke technology blog project (I)
强化学习基础记录
[hand tearing code] single case mode and producer / consumer mode
7-3 construction hash table (PTA program design)
Strengthen basic learning records
Why use redis
FAQs and answers to the imitation Niuke technology blog project (III)
2. First knowledge of C language (2)