关于pages.json的配置

129 阅读1分钟

image.png

{
  "pages": [
    {
      "path": "pages/login/login",
      "style": {
        "topWindow": false // 当前页面不显示 topWindow
      }
    }
  ],
  //tabBar导航
  "tabBar": {
	"list": [{
			"pagePath": "pages/home/home",
			"text": "首页",
			"iconPath": "../../static/static/image/home/zfb01.png",
			"selectedIconPath": "../../static/static/image/home/icon11.png"
		},
		{
			"pagePath": "pages/work/home",
			"text": "找工作",
			"iconPath": "../../static/static/image/home/zfb02.png",
			"selectedIconPath": "../../static/static/image/home/icon22.png"
		},
		
	],
	"backgroundColor": "#fff",
	"color": "#000",
	"selectedColor": "#13A738",
	"iconWidth": "44rpx"
},
  //分包
  	"subPackages": [{
	"root": "jobfriends",
	"pages": [{
		"path": "pages/work/mymycerts/mymycerts",
		"style": {
			"navigationBarTitleText": "资格证书"
		}
	}, {
		"path": "pages/work/index",
		"style": {
			"navigationBarTitleText": "",
			"enablePullDownRefresh": false
		}

	}]
}],
  //指定公共页面
  "topWindow": {
    "path": "responsive/top-window.vue", // 指定 topWindow 页面文件
    "style": {
      "height": "44px"
    }
  },
  "leftWindow": {
    "path": "responsive/left-window.vue", // 指定 leftWindow 页面文件
    "style": {
      "width": "300px"
    }
  },
  "rightWindow": {
    "path": "responsive/right-window.vue", // 指定 rightWindow 页面文件
    "style": {
      "width": "300px" // 页面宽度
    },
    "matchMedia": {
      "minWidth": 768 //生效条件,当窗口宽度大于768px时显示
    }
  }
}