今日进展
1.首页tab页面制作
选择在pages.json配置页面进行tab的制作(相对较方便和易于理解)
对于tabbar的样式,需要在外部进行声明,而针对每一个bar来讲,重点是引用和icon;
样式:pages.json 页面路由 | uni-app官网 (dcloud.net.cn)
代码如下:主要是页面路径和text文本需要注意
"tabBar": {
"color": "#999999",
"selectedColor": "#007AFF",
"backgroundColor": "#ffffff",
"borderStyle": "white",
"list": [
{
"pagePath": "pages/Index_first/Index_first",
"iconPath": "assets/tabbar/home.png",
"selectedIconPath": "assets/tabbar/home_selected.png",
"text": "首页"
},
{
"pagePath": "pages/function/function",
//"iconPath": "assets/tabbar/home.png",
//"selectedIconPath": "assets/tabbar/home_selected.png",
"text": "功能"
},
{
"pagePath": "pages/user/user",
//"iconPath": "assets/tabbar/category.png",
//"selectedIconPath": "assets/tabbar/category_selected.png",
"text": "用户"
}
]
}
二. 日常问题解析
redirectTo无法跳转至tabbar页面
首页目前制作中。。。