pages.json中的tabbar照常写;
然后在app.vue中的onLaunch方法中隐藏原生的tabbar:
uni.hideTabBar()
创建tabbar组件,components = > tabbar.vue
组件内容就是你要自定义的样式信息,如图:
组件代码:
<template>
<view class="tabbar" :style="{'padding-bottom': paddingBottomHeight + 'rpx'}">
<view class="tabbar-item" v-for="(item, index) in list" :key="i