企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
[TOC] ## 1. 导航添加标题 ### 1.1 js里添加动态标题 >使用于标题是 通过传值 确定的 ``` var title = options.title; //给导航添加标题 wx.setNavigationBarTitle({ title }); ``` ### 1.2 json里直接定义tabBar导航的配置 ``` { "navigationBarTitleText": "电影详情", } ``` ## 2. tabBar的配置 ``` //app.json "tabBar": { //默认的颜色 "color": "#666", //选择的颜色 "selectedColor": "#3785F9", "position": "bottom", //相对位置 "borderStyle": "black", "list": [ { "pagePath": "pages/index/index", "text": "文章", //默认的图片 "iconPath": "/images/tab/yuedu.png", //选择的图片 "selectedIconPath": "/images/tab/yuedu_hl.png" }, //每一页展示的内容 { "pagePath": "pages/movie/movie", "text": "电影", "iconPath": "/images/tab/dianying.png", "selectedIconPath": "/images/tab/dianying_hl.png" } ] } ```