一、全局配置文件及常用的配置项
image.png二、小程序窗口的组成部分
image.png三、window 节点常用的配置项
image.png3.1. 设置导航栏的标题
image.pngnavigationBarTitleText
3.2. 设置导航栏的背景色
image.pngnavigationBarBackgroundColor
3.3. 设置导航栏的标题颜色
image.pngnavigationBarTextStyle
3.4. 全局开启下拉刷新功能
image.pngenablePullDownRefresh
3.5. 设置下拉刷新时窗口的背景色
image.pngbackgroundColor
3.6. 设置下拉刷新时 loading 的样式
image.pngbackgroundTextStyle
3.7. 设置上拉触底的距离
image.pngonReachBottomDistance
四、tabBar
image.png image.png4.1. tabBar的6个组成部分
image.png image.png4.2. tabBar节点的配置项
image.png4.3. 每个tab 项的配置选项
image.png五、示例
"pages": [
"pages/pickFriend/pickFriend",
"pages/leftNote/leftNote",
"pages/pickedNote/pickedNote",
"pages/index/index"
],
//...省略
"tabBar": {
"selectedColor": "#0052D9",
"color": "#666666",
"borderStyle": "white",
"list": [{
"pagePath": "pages/pickFriend/pickFriend",
"text": "抽个对象",
"iconPath": "/images/tabbar/tab1-inactive.png",
"selectedIconPath": "/images/tabbar/tab1-active.png"
}, {
"pagePath": "pages/leftNote/leftNote",
"text": "留的纸条",
"iconPath": "/images/tabbar/tab2-inactive.png",
"selectedIconPath": "/images/tabbar/tab2-active.png"
}, {
"pagePath": "pages/pickedNote/pickedNote",
"text": "抽中纸条",
"iconPath": "/images/tabbar/tab3-inactive.png",
"selectedIconPath": "/images/tabbar/tab3-active.png"
}]
},
网友评论