当前位置:网站首页>Wechat applet learning notes 1
Wechat applet learning notes 1
2022-07-26 09:50:00 【~ light boat ~】
Wechat applet :QuickStart
One 、 .json Suffix JSON The configuration file
.json Sub applet configuration app.json、 Tool configuration project.config.json And page configuration page.json Let's talk about :
1、app.json
app.json Is the global configuration of the current applet , Including the page path of the applet (pages)、 Interface performance window、 Network timeout networkTimeout、 Bottom tab etc.
pages Accept an array , Each item is a string , Specify which pages the applet consists of . Each item represents the path of the corresponding page + file name
window: Set applet status bar 、 Navigation bar 、 title 、 Window background color .
{
"window":{ "navigationBarBackgroundColor": "#ffffff", "navigationBarTextStyle": "black", "navigationBarTitleText": " Wechat interface function demonstration ", "backgroundColor": "#eeeeee", "backgroundTextStyle": "light" } }tabBar Bottom or top of client window tab Bar for switching pages
Pay attention here : When setting position by top Will not display icon tabBar in list Is an array , discharge 2-5 individual 
networkTimeout Set the timeout of various network requests
2、page.json
page.json Every page can use , Configure the window on this page . Priority is higher than app.json high , Will be covered app.json The same setting item in
Page .json Only... Can be set window Related configuration items , So there is no need to write window This key
{
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"navigationBarTitleText": " Wechat interface function demonstration ",
"backgroundColor": "#eeeeee",
"backgroundTextStyle": "light" }3、project.comfig.json
This is mainly to do some personalized configuration according to their preferences , Such as interface color 、 Compile configuration, etc , When you change the computer and reinstall the tool, you need to reconfigure
therefore
With that in mind , The applet developer tool generates a project.config.json, Any configuration you make on the tool will be written to this file , When you re install tools or change your computer to work , You just load the code package of the same project , The developer tool will automatically help you recover to the personalized configuration when you developed the project , It will include the editor's color 、 A series of options such as automatic compression when uploading code .
It can be used in the project root directory project.config.json File to configure the project
{
"miniprogramRoot": "./src",
"qcloudRoot": "./svr",
"setting": {
"postcss": true,
"es6": true,
"minified": true,
"urlCheck": false
}
} Two 、WXML Template
Web programming HTML+CSS+JS,HLML It is used to describe the current page structure ,CSS Describe what the page looks like ,JS Handle the interaction between pages and users ,WXML similar HTML
The difference is :html Frequently used div,p,span . Different tags combine different components ,wxml Package commonly used components , Common labels view,button,text etc. 
3、 ... and 、WXSS style
similar CSS
Four 、JS Interaction
The latter two things will be talked about slowly
边栏推荐
- B站这个视频我是跪着看完的
- Azkaban [basic knowledge 01] core concepts + features +web interface + Architecture +job type (you can get started with Azkaban workflow scheduling system in one article)
- 服务器、客户端双认证
- In the same CONDA environment, install pytroch first and then tensorflow
- Modern medicine in the era of "Internet +"
- A new paradigm of distributed deep learning programming: Global tensor
- Matlab Simulink realizes fuzzy PID control of time-delay temperature control system of central air conditioning
- 服务器环境配置全过程
- What is the principle of reflection mechanism?
- Sqoop【付诸实践 02】Sqoop1最新版 全库导入 + 数据过滤 + 字段类型支持 说明及举例代码(query参数及字段类型强制转换)
猜你喜欢

Sqoop【环境搭建 01】CentOS Linux release 7.5 安装配置 sqoop-1.4.7 解决警告并验证(附Sqoop1+Sqoop2最新版安装包+MySQL驱动包资源)

Alibaba cloud technology expert haochendong: cloud observability - problem discovery and positioning practice

Interview shock 68: why does TCP need three handshakes?

Registration module use case writing

Solve NPM -v sudden failure and no response

Apple dominates, Samsung revives, and domestic mobile phones fail in the high-end market

Azkaban【基础知识 01】核心概念+特点+Web界面+架构+Job类型(一篇即可入门Azkaban工作流调度系统)

Keeping alive to realize MySQL automatic failover

Solve proxyerror: CONDA cannot proceed due to an error in your proxy configuration

解决ProxyError: Conda cannot proceed due to an error in your proxy configuration.
随机推荐
阿里云技术专家郝晨栋:云上可观测能力——问题的发现与定位实践
Solve NPM -v sudden failure and no response
Alibaba cloud technology expert haochendong: cloud observability - problem discovery and positioning practice
Logical architecture of MySQL
在同一conda环境下先装Pytroch后装TensorFlow
配置ADCS后访问certsrv的问题
Fiddler download and installation
QT handy notes (III) use qtcharts to draw a line chart in VS
Fuzzy PID control of motor speed
Audio and video knowledge
The combination of officially issued SSL certificate and self signed certificate realizes website two-way authentication
官方颁发的SSL证书与自签名证书结合实现网站双向认证
Add DLL
Mo team learning summary (II)
Interpretation of the standard of software programming level examination for teenagers_ second level
Applet record
MySQL的逻辑架构
[information system project manager] summary of essence of high-level series for the first time
Solve the problem of storing cookies in IE7 & IE8
IE7 set overflow attribute failure solution