当前位置:网站首页>Small program learning path 1 - getting to know small programs
Small program learning path 1 - getting to know small programs
2022-06-30 09:09:00 【Ancient dust left Taidao】
Registered account
1. Go first WeChat public platform Registered account
2. Download wechat developer tools
3. Open the wechat developer tool wechat scanning QR code to log in , Create a new item after login . I chose not to use cloud services , Cloud services are similar to providing you with servers for free , It's backstage . Then type in your appId.

Directory structure

A page , A folder , Just index Folder
- js The file deals with your logic
- wxml The file is similar to your html file
- wxcss The file is similar to your css file
- json Files are configuration files ( I haven't learned this yet )
Hello World
index.wxml Code
<!--index.wxml-->
<view class="container">
{
{ message }}
</view>
index.js Code
Page({
data: {
message: 'hello world1'
}
})
Such a Hello world It's coming out. 
List loop
index.js Code
Page({
data: {
books: ['java', 'python', 'javaScript']
}
})
index.wxml
<block wx:for="{
{books}}" wx:key="*this">
<view>{
{ item }}</view>
</block>
*this I mean this item term ,item It's every item in the array
result :

summary
Fortunately, I did vue, I feel confused when I start the applet directly .
- The list loop is also bound key Of .
- wx:for Namely vue Of v-for,*this Refer to item,item It's every item in the array
- block I understood as a vue Of template node , Because it does not generate additional nodes
边栏推荐
- Bottomsheetbehavior principle of realizing the home page effect of Gaode map
- List set export excel table
- 维基媒体基金会公布新商业产品“维基媒体企业”首批客户
- Codeworks 5 questions per day (1700 for each) - the third day
- Common query and aggregation of ES
- 127.0.0.1、0.0.0.0和localhost
- Raspberry pie 4B no screen installation system and networking using VNC wireless projection function
- Esp32 (6): Bluetooth and WiFi functions for function development
- C#访问MongoDB并执行CRUD操作
- Talk about the kotlin cooperation process and the difference between job and supervisorjob
猜你喜欢

Interpretation of source code demand:a rotation equivariant detector for aerial object detection

Pytorch BERT

Deep understanding of kotlin collaboration context coroutinecontext

Opencv learning notes-day5 (arithmetic operation of image pixels, add() addition function, subtract() subtraction function, divide() division function, multiply() multiplication function

C#访问MongoDB并执行CRUD操作

Flink SQL 自定义 Connector

Talk about how the kotlin collaboration process establishes structured concurrency

Detectron2 source code reading 4-- registrar construction model

Esp32 things (3): overview of the overall system design

Rew acoustic test (VI): signal and measurement
随机推荐
维基媒体基金会公布新商业产品“维基媒体企业”首批客户
Self made GIF dynamic graph -gifcam
Esp32 (7): I2S and I2C drivers for function development
Esp32 (4): overview of the overall code architecture
Esp32 things (VIII): music playing function of function development
Detailed explanation of rect class
Talk about how the kotlin collaboration process establishes structured concurrency
List set export excel table
Opencv learning notes -day3 (mat object and creation related operations mat:: clone(), mat:: copyto(), mat:: zeros(), mat:: ones(), scalar()...)
How to format an UTC date to use the Z (Zulu) zone designator in php?
Abstract factory pattern
[untitled]
Flink SQL 自定义 Connector
Mmcv expanding CUDA operator beginner level chapter
Understanding society at the age of 14 - reading notes on "happiness at work"
About Lombok's @data annotation
Rew acoustic test (I): microphone calibration
C # get the current timestamp
What are the SQL add / delete / modify queries?
Esp32 things (x): other functions