当前位置:网站首页>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 |
边栏推荐
- 港股将迎“最牛十元店“,名创优品能借IPO突围?
- Station B up builds the world's first pure red stone neural network, pornographic detection based on deep learning action recognition, Chen Tianqi's course progress of machine science compilation MLC,
- Informatics Olympiad 1340: [example 3-5] extended binary tree
- 本季度干货导航 | 2022年Q2
- 2022 Beijing eye health products exhibition, eye care products exhibition, China eye Expo held in November
- 点云文件的.dat文件读取保存
- 19 mongoose modularization
- Leetcode brush question: binary tree 13 (the same tree)
- Schema和Model
- ByteDance dev better technology salon was successfully held, and we joined hands with Huatai to share our experience in improving the efficiency of web research and development
猜你喜欢
1. Strengthen learning basic knowledge points
National Eye Care Education Conference, 2022 the Fourth Beijing International Youth eye health industry exhibition
Leetcode (695) - the largest area of an island
Fundamentals - configuration file analysis
B站UP搭建世界首个纯红石神经网络、基于深度学习动作识别的色情检测、陈天奇《机器学编译MLC》课程进展、AI前沿论文 | ShowMeAI资讯日报 #07.05
小程序事件绑定
2022 Beijing eye health products exhibition, eye care products exhibition, China eye Expo held in November
Classic implementation of the basic method of intelligent home of Internet of things
Frequent MySQL operations cause table locking problems
【数字IC验证快速入门】8、数字IC中的典型电路及其对应的Verilog描述方法
随机推荐
解决Thinkphp框架应用目录下数据库配置信息修改后依然按默认方式连接
[quick start of Digital IC Verification] 9. Finite state machine (FSM) necessary for Verilog RTL design
Ffplay document [easy to understand]
Mongodb basic exercises
.Net分布式事务及落地解决方案
基础篇——配置文件解析
计算lnx的一种方式
Classic implementation method of Hongmeng system controlling LED
[C language] three implementations of quick sorting and optimization details
小程序页面导航
Ros2 topic [01]: installing ros2 on win10
c語言oj得pe,ACM入門之OJ~
Leetcode: binary tree 15 (find the value in the lower left corner of the tree)
走入并行的世界
[quick start of Digital IC Verification] 6. Quick start of questasim (taking the design and verification of full adder as an example)
sort和投影
Unity编辑器扩展 UI控件篇
Introduction to dead letter queue (two consumers, one producer)
How to form standard interface documents
Sort and projection