微信小程序如何在pages.json中配置底部tab点击图标不消失
时间: 2023-06-08 20:08:44 浏览: 78
您好,关于您的问题,可以在pages.json中设置"disableScroll": true,来禁用底部tab的隐藏效果。具体配置如下:
{
"pages": [
{
"path": "pages/index/index",
"config": {
"navigationBarTitleText": "首页",
"enablePullDownRefresh": true,
"backgroundTextStyle": "dark",
"disableScroll": true
}
}
],
"tabBar": {
"list": [
{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "icon/home.png",
"selectedIconPath": "icon/home_selected.png"
},
{
"pagePath": "pages/topic/topic",
"text": "话题",
"iconPath": "icon/topic.png",
"selectedIconPath": "icon/topic_selected.png"
},
{
"pagePath": "pages/mine/mine",
"text": "我的",
"iconPath": "icon/mine.png",
"selectedIconPath": "icon/mine_selected.png"
}
]
}
}
希望能帮到您!