My dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

272 lines
7.8 KiB

  1. {
  2. "$schema": "http://json-schema.org/draft-04/schema",
  3. "description": "微信小程序 app.json 的 schema",
  4. "type": "object",
  5. "definitions": {
  6. "pages": {
  7. "type": "array",
  8. "items": {
  9. "type": "string",
  10. "description": "页面路径"
  11. },
  12. "uniqueItems": true,
  13. "description": "每一项都是字符串,来指定小程序由哪些页面组成,数组的第一项代表小程序首页"
  14. }
  15. },
  16. "properties": {
  17. "pages": {
  18. "$ref": "#/definitions/pages"
  19. },
  20. "window": {
  21. "type": "object",
  22. "properties": {
  23. "navigationBarBackgroundColor": {
  24. "type": "string",
  25. "default": "#000000",
  26. "description": "导航栏背景颜色,HexColor"
  27. },
  28. "navigationBarTextStyle": {
  29. "type": "string",
  30. "description": "导航栏标题颜色,仅支持 black/white",
  31. "default": "white",
  32. "enum": [
  33. "white",
  34. "black"
  35. ]
  36. },
  37. "navigationBarTitleText": {
  38. "type": "string",
  39. "description": "导航栏标题文字内容"
  40. },
  41. "navigationStyle": {
  42. "type": "string",
  43. "enum": [
  44. "default",
  45. "custom"
  46. ],
  47. "default": "default",
  48. "description": "导航栏样式,微信客户端 6.6.0"
  49. },
  50. "backgroundColor": {
  51. "type": "string",
  52. "default": "#ffffff",
  53. "description": "窗口的背景色, HexColor"
  54. },
  55. "backgroundTextStyle": {
  56. "type": "string",
  57. "default": "dark",
  58. "enum": [
  59. "dark",
  60. "light"
  61. ],
  62. "description": "下拉背景字体、loading 图的样式,仅支持 dark/light"
  63. },
  64. "backgroundColorTop": {
  65. "type": "string",
  66. "description": "顶部窗口的背景色,仅 iOS 支持,微信客户端 6.5.16",
  67. "default": "#ffffff"
  68. },
  69. "backgroundColorBottom": {
  70. "type": "string",
  71. "description": "底部窗口的背景色,仅 iOS 支持微信客户端 6.5.16",
  72. "default": "#ffffff"
  73. },
  74. "enablePullDownRefresh": {
  75. "type": "boolean",
  76. "default": false,
  77. "description": "是否开启下拉刷新"
  78. },
  79. "onReachBottomDistance": {
  80. "type": "number",
  81. "default": 50,
  82. "description": "页面上拉触底事件触发时距页面底部距离,单位为px"
  83. },
  84. "pageOrientation": {
  85. "type": "string",
  86. "description": "屏幕旋转设置,2.4.0 (auto) / 2.5.0 (landscape)",
  87. "default": "portrait",
  88. "enum": [
  89. "auto",
  90. "portrait",
  91. "landscape"
  92. ]
  93. }
  94. },
  95. "description": "全局的默认窗口表现"
  96. },
  97. "tabBar": {
  98. "type": "object",
  99. "required": [
  100. "color",
  101. "selectedColor",
  102. "backgroundColor",
  103. "list"
  104. ],
  105. "default": {
  106. "color": "",
  107. "selectedColor": "",
  108. "backgroundColor": "",
  109. "list": []
  110. },
  111. "properties": {
  112. "color": {
  113. "type": "string",
  114. "description": "tab 上的文字默认颜色"
  115. },
  116. "selectedColor": {
  117. "type": "string",
  118. "description": "tab 上的文字选中时的颜色"
  119. },
  120. "backgroundColor": {
  121. "type": "string",
  122. "description": "tab 的背景色"
  123. },
  124. "borderStyle": {
  125. "type": "string",
  126. "enum": [
  127. "black",
  128. "white"
  129. ],
  130. "default": "black",
  131. "description": "tabbar上边框的颜色, 仅支持 black/white"
  132. },
  133. "position": {
  134. "type": "string",
  135. "default": "bottom",
  136. "enum": [
  137. "bottom",
  138. "top"
  139. ],
  140. "description": "可选值 bottom、top"
  141. },
  142. "list": {
  143. "type": "array",
  144. "items": {
  145. "type": "object",
  146. "required": [
  147. "pagePath",
  148. "text"
  149. ],
  150. "properties": {
  151. "pagePath": {
  152. "type": "string",
  153. "description": "页面路径,必须在 pages 中先定义"
  154. },
  155. "text": {
  156. "type": "string",
  157. "description": "tab 上按钮文字"
  158. },
  159. "iconPath": {
  160. "type": "string",
  161. "description": "图片路径,icon 大小限制为40kb,建议尺寸为 81px * 81px,当 postion 为 top 时,此参数无效,不支持网络图片"
  162. },
  163. "selectedIconPath": {
  164. "type": "string",
  165. "description": "选中时的图片路径,icon 大小限制为40kb,建议尺寸为 81px * 81px ,当 postion 为 top 时,此参数无效"
  166. }
  167. }
  168. },
  169. "minItems": 2,
  170. "maxItems": 5
  171. }
  172. },
  173. "description": "底部 tab 栏的表现"
  174. },
  175. "networkTimeout": {
  176. "type": "object",
  177. "properties": {
  178. "request": {
  179. "type": "number",
  180. "default": 60000,
  181. "description": "wx.request的超时时间,单位毫秒,默认为:60000"
  182. },
  183. "connectSocket": {
  184. "type": "number",
  185. "default": 60000,
  186. "description": "wx.connectSocket的超时时间,单位毫秒,默认为:60000"
  187. },
  188. "uploadFile": {
  189. "type": "number",
  190. "default": 60000,
  191. "description": "wx.uploadFile的超时时间,单位毫秒,默认为:60000"
  192. },
  193. "downloadFile": {
  194. "type": "number",
  195. "default": 60000,
  196. "description": "wx.downloadFile的超时时间,单位毫秒,默认为:60000"
  197. }
  198. },
  199. "description": "网络超时时间"
  200. },
  201. "debug": {
  202. "type": "boolean",
  203. "description": "可以在开发者工具中开启 debug 模式,在开发者工具的控制台面板,调试信息以 info 的形式给出,其信息有Page的注册,页面路由,数据更新,事件触发 。 可以帮助开发者快速定位一些常见的问题"
  204. },
  205. "functionalPages": {
  206. "type": "boolean",
  207. "description": "是否启用插件功能页",
  208. "default": false
  209. },
  210. "subPackages": {
  211. "type": "array",
  212. "description": "分包加载",
  213. "items": {
  214. "type": "object",
  215. "properties": {
  216. "root": {
  217. "type": "string",
  218. "description": "指定分包的名称,对应会自动生成一个文件夹"
  219. },
  220. "pages": {
  221. "$ref": "#/definitions/pages"
  222. }
  223. }
  224. }
  225. },
  226. "requiredBackgroundModes": {
  227. "type": "array",
  228. "items": {
  229. "type": "string",
  230. "description": "台运行的能力",
  231. "enum": [
  232. "audio"
  233. ]
  234. },
  235. "description": "申明需要后台运行的能力,类型为数组",
  236. "uniqueItems": true
  237. },
  238. "plugins": {
  239. "type": "object",
  240. "default": {},
  241. "description": "引入插件代码包",
  242. "properties": {}
  243. },
  244. "resizable": {
  245. "type": "boolean",
  246. "description": "iPad 小程序是否支持屏幕旋转",
  247. "default": false
  248. },
  249. "navigateToMiniProgramAppIdList": {
  250. "type": "array",
  251. "items": {
  252. "type": "string",
  253. "description": "对应appid"
  254. },
  255. "description": "需要跳转的小程序列表"
  256. },
  257. "usingComponents": {
  258. "type": "object",
  259. "properties": {},
  260. "description": "全局自定义组件配置"
  261. },
  262. "permission": {
  263. "type": "object",
  264. "properties": {},
  265. "description": "小程序接口权限相关设置,微信客户端 7.0.0"
  266. }
  267. },
  268. "required": [
  269. "pages"
  270. ]
  271. }