首先先在pages.josn中把需要tabBar设置好:只需要将页面路径放进去就可以!
可以看官网:https://uniapp.dcloud.io/collocation/pages.html#tabbar
"tabBar":{
"color":"#ADADAD", //文字颜色
"selectedColor":"#FEE42A", //选中颜色
"backgroundColor":"#FFFFFF", //背景颜色
"borderStyle":"black", //底部栏的顶部线的颜色
"list":[
{
"pagePath":"***/***/***",
"text":"**",
"iconPath":"static/tabbar/index.png", //图标路径
"selectedIconPath":"static/tabbar/indexed.png" //点击选中图标路径
},
{
"pagePath":"pages/news/news",
"text":"",
"iconPath":"static/tabbar/news.png",
"selectedIconPath":"static/tabbar/newsed.png"
},
{
"pagePath":"pages/paper/paper",
"text":"",
"iconPath":"static/tabbar/paper.png",
"selectedIconPath":"static/tabbar/papered.png"
},
{
"pagePath":"pages/home/home",
"text":"",
"iconPath":"static/tabbar/home.png",
"selectedIconPath":"static/tabbar/homeed.png"
}
]
}
禁止ios滑动
pages.json里面加一个属性就可以了
代码如下:
"app-plus":{
"popGesture":"none", //使iOS默认手势关闭页面无效 禁止左滑
"bounce":"none" // 关闭iOS上下滑动手势
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)