当前位置:网站首页>Applet global configuration
Applet global configuration
2022-07-05 20:26:00 【'wx】
In the applet root directory app.json File is the global configuration file of the applet . Common configuration items are as follows :
1.pages
Record the storage path of all pages of the current applet
2.window
Set the appearance of the applet window globally
3.tabBar
Set the at the bottom of the applet tarBar effect
4.style
Whether to enable the new component style
2. understand window Common configuration items of nodes
Property name | type | The default value is | explain |
navigationBarTitleText | String | character string | Navigation bar title text content |
navigationBarBackgroundColor | HexColor | #000000 | Navigation bar background color , Such as #000000 |
navigationBarTextStyle | String | white | Navigation bar Title Color , Support only black / white |
backgroundColor | HexColor | #ffffff | Background color of window |
backgroundTextStyle | String | dark | The drop-down loading The style of , Support only dark / light |
enablePullDownRefresh | Boolean | false | Enable pull-down refresh globally |
onReachBottomDistance | Number | 50 | The trigger time interval of the bottom pull event on the page Distance from the bottom of the page , Unit is px |
"window":{
"backgroundTextStyle":"light",
"navigationBarBackgroundColor": "#bfa",
"navigationBarTitleText": "wx",
"navigationBarTextStyle":"black",
"backgroundColor": "#bfa",
"enablePullDownRefresh": true
},
3.tabBar
tabBar It is a common page effect in mobile applications , It is used to realize the fast switching of multiple pages (tabBar It can only be done by 2-5 individual tab Tab , Only the bottom tabBar Will show icon Icon )
tabBar6 Components
tabBar Configuration item of node
attribute | type | Required | The default value is | describe |
position | String | no | bottom | tabBar The location of , Support only bottom/top |
borderStyle | String | no | black | tabBar The color of the top border , Support only black/white |
color | HexColor | no | tab The default of the text on ( Not selected ) Color | |
selectedColor | HexColor | no | tab The color of the selected text on | |
backgroundColor | HexColor | no | tabBar Background color of | |
list | Array | yes | tab List of tabs , least 2 individual 、 most 5 individual tab |
"tabBar": {
"list":[
{
"pagePath": "pages/home/home",
"text": " Home page ",
"iconPath": "/images/home.png",
"selectedIconPath": "/images/home-active.png"
},
{
"pagePath": "pages/message/message",
"text": " news ",
"iconPath": "/images/message.png",
"selectedIconPath": "/images/message-active.png"
},
{
"pagePath": "pages/contact/contact",
"text": " Contact us ",
"iconPath": "/images/contact.png",
"selectedIconPath": "/images/contact-active.png"
}
]
},
Every tab Configuration options for item
attribute | type | Required | describe |
pagePath | String | yes | Page path , The page must be in pages Predefined in |
text | String | yes | tab Text displayed on |
iconPath | String | no | Icon path when not selected ; When postion by top when , No display icon |
selectedIconPath | String | no | Icon path when selected ; When postion by top when , No display icon |
边栏推荐
- Leetcode(347)——前 K 个高频元素
- [Yugong series] go teaching course in July 2022 004 go code Notes
- 14、Transformer--VIT TNT BETR
- 【数字IC验证快速入门】8、数字IC中的典型电路及其对应的Verilog描述方法
- 死信队列入门(两个消费者,一个生产者)
- Leetcode skimming: binary tree 17 (construct binary tree from middle order and post order traversal sequence)
- Unity editor extended UI control
- How to select the Block Editor? Impression notes verse, notation, flowus
- 本季度干货导航 | 2022年Q2
- Codeforces Round #804 (Div. 2) - A, B, C
猜你喜欢
Wechat applet regular expression extraction link
CTF reverse Foundation
小程序事件绑定
IC科普文:ECO的那些事儿
Hong Kong stocks will welcome the "best ten yuan store". Can famous creative products break through through the IPO?
Zero cloud new UI design
死信队列入门(两个消费者,一个生产者)
CVPR 2022 | common 3D damage and data enhancement
About the priority of Bram IP reset
Leetcode skimming: binary tree 10 (number of nodes of a complete binary tree)
随机推荐
y57.第三章 Kubernetes从入门到精通 -- 业务镜像版本升级及回滚(三十)
Is it safe for Galaxy Securities to open an account online?
CTF reverse Foundation
【愚公系列】2022年7月 Go教学课程 004-Go代码注释
Minimum commission for stock trading account opening, where to open an account with low commission? Is it safe to open an account on your mobile phone
Fundamentals - configuration file analysis
C language OJ gets PE, OJ of ACM introduction~
[quick start of Digital IC Verification] 3. Introduction to the whole process of Digital IC Design
无卷积骨干网络:金字塔Transformer,提升目标检测/分割等任务精度(附源代码)...
.Net分布式事务及落地解决方案
CTF逆向基础
19 mongoose modularization
Notes on key vocabulary in the English original of the biography of jobs (12) [chapter ten & eleven]
Document method
19 Mongoose模块化
Schema and model
Schema和Model
Bzoj 3747 poi2015 kinoman segment tree
What is PyC file
B站UP搭建世界首个纯红石神经网络、基于深度学习动作识别的色情检测、陈天奇《机器学编译MLC》课程进展、AI前沿论文 | ShowMeAI资讯日报 #07.05