当前位置:网站首页>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
边栏推荐
- Flink sql -- No factory implements ‘org.apache.flink.table.delegation.ExecutorFactory‘.
- Interviewer: do you understand the principle of recyclerview layout animation?
- Opencv learning notes -day10 logical operation of image pixels (usage of rectangle function and rect function and bit related operation in openCV)
- Flink sql -- No factory implements ‘org. apache. flink. table. delegation. ExecutorFactory‘.
- Icon resources
- Opencv learning notes -day3 (mat object and creation related operations mat:: clone(), mat:: copyto(), mat:: zeros(), mat:: ones(), scalar()...)
- Flink 数据偶尔数据积压导致checkpoint失败
- Esp32 things (x): other functions
- Raspberry pie 4B no screen installation system and networking using VNC wireless projection function
- [data analysis and display]
猜你喜欢
QT connection to Shentong database
Deep understanding of continuation principle
C accesses mongodb and performs CRUD operations
asdsadadsad
Concatapter tutorial
Opencv learning notes -day4 image pixel reading and writing operations (array traversal and pointer traversal implementation, uchar vec3b data type and mat class functions mat:: at(), mat:: ptr())
Bottomsheetbehavior principle of realizing the home page effect of Gaode map
100 lines of code and a voice conversation assistant
使用华为性能管理服务,按需配置采样率
Opencv learning notes -day3 (mat object and creation related operations mat:: clone(), mat:: copyto(), mat:: zeros(), mat:: ones(), scalar()...)
随机推荐
Installation, use and explanation of vulnerability scanning tool OpenVAS
C # get the current timestamp
Opencv learning notes-day6-7 (scroll bar operation demonstration is used to adjust image brightness and contrast, and createtrackbar() creates a scroll bar function)
Tidb v6.0.0 (DMR): initial test of cache table - tidb Book rush
Detailed explanation of pipline of mmdetection
Bottomsheetbehavior principle of realizing the home page effect of Gaode map
Bind threads to run on a specific CPU logical kernel
[untitled]
Coredata acquisition in swift sorting, ascending, descending
Deep understanding of continuation principle
JVM tuning related commands and explanations
Esp32 things (I): Preface
El input limit can only input numbers
[protobuf] protobuf generates cc/h file through proto file
Talking about the difference between kotlin collaboration and thread
Harmonyos actual combat - ten thousand words long article understanding service card development process
Design specification for smart speakers v1.0
Axure make menu bar effect
CUDA implements matrix replication
mysql基础入门 动力节点[老杜]课堂作业