1.认识app.json
{"pages":["pages/index/index","pages/logs/logs"],"window":{"backgroundTextStyle":"light","navigationBarBackgroundColor": "#fff","navigationBarTitleText": "Weixin","navigationBarTextStyle":"black"},"style": "v2","sitemapLocation": "sitemap.json"}
- page 页面配置
- window 窗口配置
- backgroundTextStyle 在页面下拉刷新时三个加载点的颜色
- navigationBarBackgroundColor 设置导航栏背景颜色
- navigationBarTitleText 设置导航栏想要显示的名称
- navigationBarTextStyle 导航栏字体颜色
- enablePullDownRefresh 下拉刷新
- backgroundColor 下拉刷新时背景的颜色
sitemapLocation 是否允许小程序进行站内搜索(参考)
2.基础操作之底部触摸栏
"tabBar": {"selectedColor": "","borderStyle": "","list": [{"pagePath": "pagePath","text": "text","iconPath": "iconPath","selectedIconPath": "selectedIconPath"},{"pagePath": "pagePath","text": "text","iconPath": "iconPath","selectedIconPath": "selectedIconPath"}]}
pagepath 指的是页面路径
- text 指的是触摸栏的名称
- iconpath 指的是未触摸时的状态
- selectedIconPath 指的是触摸时展示的状态
- selectedColor 设置触摸后的字体颜色
- borderStyle 设置底部导航栏线的样式
