pages.json文件用来对uni-app进行全局配置,决定页面文件的路径,窗口表现,设置多tab

pages.json配置项列表:

globalStyle     Object        否    设置默认界面的窗口表现

pages        Object  Array    是    设置页面路径及窗口表现

tabBar         Object           否    设置底部  tab  的表现

condition        Object        否    启动模式设置

以下是包含了所有配置选项的pages.json:

 1 {
 2   "pages": [{
 3     "path": "pages/component/index",
 4     "style": {
 5       "navigationBarTitleText": "组件"
 6     }
 7   }, {
 8     "path": "pages/API/index",
 9     "style": {
10       "navigationBarTitleText": "接口"
11     }
12   }, {
13     "path": "pages/component/view/index",
14     "style": {
15       "navigationBarTitleText": "view"
16     }
17   }],
18   "globalStyle": {
19     "navigationBarTextStyle": "black",
20     "navigationBarTitleText": "演示",
21     "navigationBarBackgroundColor": "#F8F8F8",
22     "backgroundColor": "#F8F8F8"
23   },
24   "tabBar": {
25     "color": "#7A7E83",
26     "selectedColor": "#3cc51f",
27     "borderStyle": "black",
28     "backgroundColor": "#ffffff",
29     "list": [{
30       "pagePath": "pages/component/index",
31       "iconPath": "static/image/icon_component.png",
32       "selectedIconPath": "static/image/icon_component_HL.png",
33       "text": "组件"
34     }, {
35       "pagePath": "pages/API/index",
36       "iconPath": "static/image/icon_API.png",
37       "selectedIconPath": "static/image/icon_API_HL.png",
38       "text": "接口"
39     }]
40   }
41 }
所有配置项

相关文章: