ネイティブ アプレットの tabBar

1. 最初のステップは、app.json 内のページの下部ナビゲーションに対応するページを追加することです。

2. 2 番目のステップでは、app.json の「window」と同じレベルに「tabBar」を記述します。 { "list": [ {tabBar の対応する属性} ] }

// tabBar的配置 1,必须要有两个tabBar页面, 2,在"pages"中必须把tabBar页面放上面才会显示

"tabBar":{
 "color": "#fff",    //(可以不用写) 设置未选中时文字的颜色,,不写默认值就是黑色
 "selectedColor": "#fff", //(可以不用写) 设置选中时 文字的颜色,,不写默认值就是黑色
 "backgroundColor": "#ccc",  //(可以不用写) 设置tabBar的背景颜色,,不写有默认值是白色
 "list":[
  {
    "pagePath": "",          //地址 
    "text": "首页",         //底部导航的文字内容  比如 首页
    "iconPath": "",         //未选中状态下的图标
    "selectedIconPath": ""   //选中时显示的图标
  },
  {
    "pagePath":"",  //地址 
    "text": "购物车",  //底部导航的文字内容  比如 首页
    "iconPath": "",         //未选中状态下的图标
    "selectedIconPath": ""   //选中时显示的图标
  },
 {
    "pagePath":"",  //地址 
    "text": "我的",  //底部导航的文字内容  比如 首页
    "iconPath": "",         //未选中状态下的图标
    "selectedIconPath": ""   //选中时显示的图标
  },
]
}

おすすめ

転載: blog.csdn.net/weixin_57127914/article/details/130981195