前端学习(1716):前端系列javascript之页面配置下

page.vue

{
	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
		{
		    "path" : "pages/test-page/test-page",
		    "style" : {
				"navigationBarTitleText":"test-page",
				"h5":{
					"titleNView":{
						"backgroundColor":"pink",
						"titleColor":"#FFFFFF"
					}
			}
			
			}
		},
		{
			"path": "pages/index/index",
			"style": {
				"navigationBarTitleText": "uni-app"
			}
		}
	    
    ],
	"globalStyle": {
		"navigationBarTextStyle": "black",
		"navigationBarTitleText": "uni-app",
		"navigationBarBackgroundColor": "red",
		"backgroundColor": "#F8F8F8",
		"h5":{},
		"mp-weixin":{
			
		}
		
		},
		"tabBar":{
			"color":"#007AFF",
			"selectedColor":"#007AFF",
			"backgroundColor":"#f5f5f5",
			"list":[{
				"pagePath":"pages/index/index",
				"iconPath":"static/logo.png",
				"text":"home"
			},{
				"pagePath":"pages/test-page/test-page",
				"iconPath":"static/logo.png",
				"text":"page"
			}]
	},
	"condition" : { //模式配置,仅开发期间生效
		"current": 0, //当前激活的模式(list 的索引项)
		"list": [
			{
				"name": "", //模式名称
				"path": "", //启动页面,必选
				"query": "" //启动参数,在页面的onLoad函数里面得到
			}
		]
	}
}

运行结果

猜你喜欢

转载自blog.csdn.net/weixin_43392489/article/details/107140449