当前位置:   article > 正文

uni-app开发攻略 底部导航栏_uniapp底部nav

uniapp底部nav

uni-app开发攻略 底部导航栏

{
	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
		{
			"path": "pages/index/index",
			"style": {
				"navigationBarTitleText": "首页",
				"navigationBarBackgroundColor": "#eee"
			}
		},
		{
			"path": "pages/find/find",
			"style": {
				"navigationBarTitleText": "发现",
				"navigationBarBackgroundColor": "#eee"
			}
		},
		{
			"path": "pages/nav/nav",
			"style": {
				"navigationBarTitleText": "导航",
				"navigationBarBackgroundColor": "#eee"
			}
		},
		{
			"path": "pages/person/person",
			"style": {
				"navigationBarTitleText": "我的",
				"navigationBarBackgroundColor": "#eee"
			}
		}
	],
	"globalStyle": {
		"navigationBarTextStyle": "black", //导航
		"navigationBarTitleText": "uni-app", //导航栏标题文本
		"navigationBarBackgroundColor": "#4CD964", //导航背景色
		"backgroundColor": "#F8F8F8"
	},
	"tabBar": {
		"color": "#cdcdcd",
		"selectedColor": "#39cffc",
		"borderStyle": "black",
		"backgroundColor": "#ffffff",
		"list": [{
				"pagePath": "pages/index/index",
				"iconPath": "static/index.png",
				"selectedIconPath": "static/index1.png",
				"text": "首页"
			}, {
				"pagePath": "pages/find/find",
				"iconPath": "static/find.png",
				"selectedIconPath": "static/find1.png",
				"text": "发现"
			},
			{
				"pagePath": "pages/nav/nav",
				"iconPath": "static/nav.png",
				"selectedIconPath": "static/nav1.png",
				"text": "导航"
			}, {
				"pagePath": "pages/person/person",
				"iconPath": "static/person.png",
				"selectedIconPath": "static/person1.png",
				"text": "我的"
			}
		]
	},

	"condition": { //模式配置,仅开发期间生效
		"current": 1, //当前激活的模式(list 的索引项)
		"list": [{
				"name": "首页", //模式名称
				"path": "pages/index/index", //启动页面,必选
				"query": "" //启动参数,在页面的onLoad函数里面得到。uid=100&t=1535987051
			},
			{
				"name": "发现", //模式名称
				"path": "pages/find/find", //启动页面,必选
				"query": "" //启动参数,在页面的onLoad函数里面得到。
			},
			{
				"name": "导航", //模式名称
				"path": "pages/nav/nav", //启动页面,必选
				"query": "" //启动参数,在页面的onLoad函数里面得到。uid=100&t=1535987051
			},
			{
				"name": "我的", //模式名称
				"path": "pages/person/person", //启动页面,必选
				"query": "" //启动参数,在页面的onLoad函数里面得到。
			}
		]
	}
}

  • 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
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
本文内容由网友自发贡献,转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/131564
推荐阅读