pages.json
最后更新于:2022-04-02 03:37:12
[TOC]
> [参考](https://uniapp.dcloud.io/collocation/pages?id=h5-searchinput)
## 概述
`pages.json`文件用来对 uni-app 进行全局配置,决定页面文件的路径、窗口样式、原生的导航栏、底部的原生tabbar 等
### [配置项列表](https://uniapp.dcloud.net.cn/collocation/pages?id=%e9%85%8d%e7%bd%ae%e9%a1%b9%e5%88%97%e8%a1%a8)
| 属性 | 类型 | 必填 | 描述 | 平台兼容 |
| --- | --- | --- | --- | --- |
| [globalStyle](https://uniapp.dcloud.net.cn/collocation/pages?id=globalstyle) | Object | 否 | 设置默认页面的窗口表现 | |
| [pages](https://uniapp.dcloud.net.cn/collocation/pages?id=pages) | Object Array | 是 | 设置页面路径及窗口表现 | |
| [easycom](https://uniapp.dcloud.net.cn/collocation/pages?id=easycom) | Object | 否 | 组件自动引入规则 | 2.5.5+ |
| [tabBar](https://uniapp.dcloud.net.cn/collocation/pages?id=tabbar) | Object | 否 | 设置底部 tab 的表现 | |
| [condition](https://uniapp.dcloud.net.cn/collocation/pages?id=condition) | Object | 否 | 启动模式配置 | |
| [subPackages](https://uniapp.dcloud.net.cn/collocation/pages?id=subpackages) | Object Array | 否 | 分包加载配置 | |
| [preloadRule](https://uniapp.dcloud.net.cn/collocation/pages?id=preloadrule) | Object | 否 | 分包预下载规则 | 微信小程序 |
| [workers](https://developers.weixin.qq.com/miniprogram/dev/framework/workers.html) | String | 否 | `Worker`代码放置的目录 | 微信小程序 |
| [leftWindow](https://uniapp.dcloud.net.cn/collocation/pages?id=leftwindow) | Object | 否 | 大屏左侧窗口 | H5 |
| [topWindow](https://uniapp.dcloud.net.cn/collocation/pages?id=topwindow) | Object | 否 | 大屏顶部窗口 | H5 |
| [rightWindow](https://uniapp.dcloud.net.cn/collocation/pages?id=rightwindow) | Object | 否 | 大屏右侧窗口 | H5 |
';