这一节内容比较简单,实现的效果图如下
官方文档—框架—配置
查阅文档后,我们的实现方式如下:
"tabBar":{"borderStyle":"white","position":"bottom","list":[{"pagePath":"pages/reading/reading","text":"干货","iconPath":"images/tab/yuedu.pg","selectedIconPath":"images/tab/yuedu_hl.png"},{"pagePath": "pages/welfare/welfare","text": "福利","iconPath": "images/tab/dianying.png","selectedIconPath": "images/tab/dianying_hl.png"}]}
Tip:
- 当设置 position 为 top 时,将不会显示 icon
可以使用 API 实现,也可以使用配置文件实现
官方文档—框架—配置
官方文档—API—设置置顶信息
onLoad: function (options) {// other codewx.setNavigationBarTitle({title: '全部干货'})// other code
},
在当前页面的
.json
文件中添加如下代码
{"navigationBarTitleText":"全部干货"
}
Tip: 在除了
app.json
之外的其他.json
配置文件只能配置window
属性
本文发布于:2024-02-02 03:12:35,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170681631341017.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |