page.json 页面
"tabBar": {
"color": "#000",
"selectedColor": "#ff9e00",
// "borderStyle" : "#eeeeee",
"backgroundColor": "#fff",
"list": [{
"pagePath": "pages/index/index",
"iconPath": "static/home.png",
"selectedIconPath": "static/home1.png",
"text": "首页"
},
{
"pagePath": "pages/user/user",
"iconPath": "static/Profile.png",
"selectedIconPath": "static/Profile1.png",
"text": "我的"
}
],
"midButton": {
"width": "150rpx",
"height": "150rpx",
"text": "",
"iconPath": "/static/mid.png",
"iconWidth": "116rpx"
}
}
app.vue 页面
uni.onTabBarMidButtonTap((e) => {
uni.switchTab({
url: '/pages/new/new',
});
})