问题与处理策略
问题描述
{"tabBar": {"color": "#999","selectedColor": "#3D98FF","backgroundColor": "#fff","borderStyle": "#999","list": [{"pagePath": "pages/home/home","text": "首页"},{"pagePath": "pages/info/info","text": "咨询"},{"pagePath": "pages/goods/goods","text": "产品"},{"pagePath": "pages/mine/mine","text": "我的"}]}
}
[ miniprogram/app.json 文件内容错误] miniprogram/app.json:
tabBar.borderStyle 字段需为 black,white(env: Windows,mp,1.06.2306020; lib: 3.7.8)
问题原因
-
错误表明html" title=微信html" title=小程序>小程序>微信html" title=小程序>小程序开发工具在编译时检测到
app.json
文件中的tabBar.borderStyle
字段值不合法 -
tabBar.borderStyle
字段只能设置为 black 或 white,当前配置的值不符合要求
处理策略
- 将
tabBar.borderStyle
字段的值改为 black 或 white
{"tabBar": {"color": "#999","selectedColor": "#3D98FF","backgroundColor": "#fff","borderStyle": "black","list": [{"pagePath": "pages/home/home","text": "首页"},{"pagePath": "pages/info/info","text": "咨询"},{"pagePath": "pages/goods/goods","text": "产品"},{"pagePath": "pages/mine/mine","text": "我的"}]}
}