"tabBar":{ "color":"#333333", "selectedColor":"#2a75f6", "backgroundColor":"#f4f1f1", "position":"bottom", "borderStyle":"white", "list":[ { "pagePath":"pages/Home/Home", "text":"", "iconPath":"static/icon/hands-fill-2.png", "selectedIconPath":"static/icon/hands-fill.png" }, { "pagePath":"pages/College/College", "text":"", "iconPath":"static/icon/xueyuan.png", "selectedIconPath":"static/icon/xueyuan-2.png" }, { "pagePath":"pages/Mine/Log/Log", "text":"", "iconPath":"static/icon/rizhi-2.png", "selectedIconPath":"static/icon/rizhi.png" }, { "pagePath":"pages/Mine/Mine", "text":"", "iconPath":"static/icon/wode.png", "selectedIconPath":"static/icon/wode-2.png" } ], "midButton": { "width": "60px", "height": "60px", "iconPath": "static/icon/kongzhitai.png", "iconWidth": "40px", "text":"控制台", "backgroundImage":"static/icon/yuan-2.png" } },
监听midButton点击事件
// App.vue 中监听
onLaunch: function() { // tabbar中间按钮点击事件 uni.onTabBarMidButtonTap(function(e){ uni.navigateTo({ url: "/pages/Home/Console/Console", animationType: "slide-in-bottom", // 动画类型 animationDuration: 150, // 窗口动画持续时间,单位为 ms fail(err) { console.log(err) } }) }) }
原文地址:https://www.cnblogs.com/zhaohui-116/p/14450742.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。