uniapp 如何设置 tabbar 的 midButton 按钮

效果展示:

中间的国际化没生效(忽略就行) 

 示例代码:

然后在  App.vue 中进行监听:

<script>
	export default {
		onLaunch(e) {
			// #ifdef APP
			uni.onTabBarMidButtonTap(()=>{
				console.log("中间按钮点击回调");
			})
			// #endif
		}
	}
</script>
<style lang="scss">
</style>

 官方文档参考:pages.json 页面路由 | uni-app官网

到此这篇关于uniapp 设置 tabbar 的 midButton 按钮的文章就介绍到这了,更多相关uniapp tabbar midButton 按钮内容请搜索脚本之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持脚本之家!

© 版权声明
THE END
支持一下吧
点赞6 分享
评论 抢沙发
头像
请文明发言!
提交
头像

昵称

取消
昵称表情代码快捷回复

    暂无评论内容