小程序的tabbar
Page页面的生命周期事件函数
window配置
Window一般配置
"window": {
"backgroundTextStyle": "light", // 下拉 loading 的样式,仅支持 dark / light
"navigationBarBackgroundColor": "#fff", // 导航栏背景颜色
"navigationBarTitleText": "哈哈", // 导航栏标题内容
"navigationBarTextStyle": "black", // 导航栏标题颜色 black / white
"navigationStyle": "custom", // 导航栏样式 默认为default custom 表示自定义导航栏,只保留右上角
"backgroundColor":"#ffffff" , // 窗口的背景颜色
"enablePullDownRefresh":false //是否开启下拉刷新
},
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "哈哈",
"navigationBarTextStyle": "black",
"backgroundColor":"#ffffff",
"enablePullDownRefresh":false
},
tabbar配置
tabbar一般配置
"tabBar": {
"color": "#000", // 文字默认颜色
"borderStyle": "black", // tabBar上边框的颜色 仅支持 black / white
"selectedColor": "#ff6600", // tab 上的文字选中时的颜色
"position": "bottom", // 位置 top | bottom,
"custom": false, // 自定义tabBar 默认false
"list": [ // tab列表
{
"pagePath": "pages/news/news", // 页面路径
"text": "新闻", // tab 上按钮文字
"iconPath": "pages/images/yuedu.png", // 图片路径,icon 大小限制为 40kb,建议尺寸为 81px * 81px,不支持网络图片。
"selectedIconPath": "pages/images/193.jpg" // 选中时的图片路径,icon 大小限制为 40kb,建议尺寸为 81px * 81px,不支持网络图片。
},
{
"pagePath": "pages/movie/movie",
"text": "电影",
"iconPath": "pages/images/diany.png",
"selectedIconPath": "pages/images/506.jpg"
}
]
}
"tabBar": {
"color": "#666666",
"borderStyle": "black",
"selectedColor": "#333",
"position": "bottom",
"custom": false,
"list": [
{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "/image/home.png",
"selectedIconPath": "/image/home_active.png"
},
{
"pagePath": "pages/photo/photo",
"text": "拍照",
"iconPath": "/image/photo.png",
"selectedIconPath": "/image/photo_active.png"
},
{
"pagePath": "pages/shop/shop",
"text": "商城",
"iconPath": "/image/shop.png",
"selectedIconPath": "/image/shop_active.png"
},
{
"pagePath": "pages/my/my",
"text": "我的",
"iconPath": "/image/my.png",
"selectedIconPath": "/image/my_active.png"
}
]
},
页面(路由)跳转
navigator
编程导航
route
CSS的一些常用属性
margin
padding
border
box-sizing
background