uni-app configures the bottom navigation bar

Configure directly in page.json. All four parameters need to be configured. The required pictures must be

{
	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
		{
			"path": "pages/index/index",
			"style": {
				"navigationBarTitleText": "微信"
			}
		}
	],
	"globalStyle": {
		"navigationBarTextStyle": "black",//导航栏颜色
		"navigationBarTitleText": "仿微信",//导航栏名称
		"navigationBarBackgroundColor": "#F8F8F8",
		"backgroundColor": "#F8F8F8",
		"app-plus":{
			// "titleNView":false,//取消原生导航
			"scrollIndicator":"none"//取消滚动条
		}
	},
	"tabBar":{
		"borderStyle":"black",//边框颜色
		"backgroundColor":"#F7F7F7",//背景颜色
		"color":"#000000",//默认颜色
		"selectedColor":"#07C160",//选中的颜色
		"list":[
			{
				"iconPath":"static/xiaoxi.png",
				"selectedIconPath":"static/xiaoxi1.png",
				"text":"消息",
				"pagePath":"pages/index/index"
			},
			{
				"iconPath":"static/faxian.png",
				"selectedIconPath":"static/faxian1.png",
				"text":"发现",
				"pagePath":"pages/tongxunlu"
			},
			{
				"iconPath":"static/tongxunlu.png",
				"selectedIconPath":"static/tongxunlu1.png",
				"text":"通讯录",
				"pagePath":"pages/faxian"
			},
			{
				"iconPath":"static/wo.png",
				"selectedIconPath":"static/wo1.png",
				"text":"我",
				"pagePath":"pages/wo"
			}
		]
	}
}

It's an English name.

Guess you like

Origin blog.csdn.net/m0_74265396/article/details/132003214