小程序云开发-----基础文件夹配置

文件夹

在这里插入图片描述
cloudfunctions存储云端内容
miniprogram存储前端内容

在这里插入图片描述
app.json
app.json内的pages是模板页,所有的页面都要写,在pages内创建的路径会自动生成文件
在这里插入图片描述
小程序下面的navBar,最少数组元素为两个最多为五个,pagePath是页面,必须在pages配置过,iconPath是图标路径,text是下面bar的名字,selectedIconPath是点击过后的颜色

"tabBar": {
    "list": [{
      "pagePath": "pagePath",
      "text": "text",
      "iconPath": "iconPath",
      "selectedIconPath": "selectedIconPath"
    }]
  },

字体颜色的变化:

 "tabBar": {
    "color": "#ccc",
    "selectedColor": "#f40",
    "list": [{
      "pagePath": "pagePath",
      "text": "text",
      "iconPath": "iconPath",
      "selectedIconPath": "selectedIconPath"
    }]
  },

注意请不要在json文件内打注释

导航颜色

在这里插入图片描述

"window": {
    "backgroundColor": "#F6F6F6",
    "backgroundTextStyle": "light",
    "navigationBarBackgroundColor": "#F6F6F6",
    导航颜色
    "navigationBarTitleText": "云开发 QuickStart",
	导航内容
    "navigationBarTextStyle": "black"
    导航文字颜色(white/black)
  },

在这里插入图片描述

发布了71 篇原创文章 · 获赞 21 · 访问量 3651

猜你喜欢

转载自blog.csdn.net/qq_26386437/article/details/104643839