切换主题
一、引入tabbar图标
一、pages的配置
json
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "首页"
}
},
{
"path" : "pages/topic/topic",
"style" :
{
"navigationBarTitleText" : "话题分类",
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/msg/msg",
"style" :
{
"navigationBarTitleText" : "消息",
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/my/my",
"style" :
{
"navigationBarTitleText" : "个人中心",
"enablePullDownRefresh" : false
}
}
],1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
二、tabbar的配置
json
"tabBar": {
"color": "#323232",
"selectedColor": "#f85c81",
"borderStyle": "black",
"backgroundColor": "#FFFFFF",
"list": [
{
"iconPath": "static/tabbar/index.png",
"selectedIconPath": "static/tabbar/indexed.png",
"pagePath": "pages/index/index",
"text": "首页"
},
{
"iconPath": "static/tabbar/news.png",
"selectedIconPath": "static/tabbar/newsed.png",
"pagePath": "pages/topic/topic",
"text": "话题"
},
{
"iconPath": "static/tabbar/paper.png",
"selectedIconPath": "static/tabbar/papered.png",
"pagePath": "pages/msg/msg",
"text": "消息"
},
{
"iconPath": "static/tabbar/home.png",
"selectedIconPath": "static/tabbar/homeed.png",
"pagePath": "pages/my/my",
"text": "我的"
}
]
},1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
DQ博客