利用uview ui 1.x 里面的组件配置 样式凸起
data() {
return {
list: [{
iconPath: "/static/images/foot1.png",
selectedIconPath: "/static/images/foot1_on.png",
text: '首页',
isDot: false,
customIcon: false,
pagePath: "/pages/index/index"
},
{
iconPath: "/static/images/foot2.png",
selectedIconPath: "/static/images/foot2_on.png",
text: '分类',
customIcon: false,
pagePath: "/pages/product/product"
},
{
iconPath: "/static/images/middle.png",
selectedIconPath: "/static/images/middle.png",
midButton: true,
customIcon: false,
text:'机构之声',
pagePath: "/pages/clue/newClue"
},
{
iconPath: "/static/images/foot3.png",
selectedIconPath: "/static/images/foot3_on.png",
text: '排行',
customIcon: false,
pagePath: "/pages/clue/clue"
},
{
iconPath: "/static/images/foot4.png",
selectedIconPath: "/static/images/foot4_on.png",
text: '我的',
isDot: false,
customIcon: false,
pagePath: "/pages/ucenter/ucenter"
},
],
current: 0,
}
},
<u-tabbar v-model="current" :list="list" :mid-button="true"></u-tabbar>
pages.json必须也得配置
"tabBar": {
"color": "#333",
"selectedColor": "#000",
"backgroundColor": "#FFFFFF",
"borderStyle": "white",
"list": [{
"pagePath": "pages/index/index",
"iconPath": "static/images/foot1.png",
"selectedIconPath": "static/images/foot1_on.png",
"text": "首页"
},
{
"pagePath": "pages/classify/classify",
"iconPath": "static/images/foot2.png",
"selectedIconPath": "static/images/foot2_on.png",
"text": "分类"
},
{
"pagePath": "pages/cart/cart",
"iconPath": "static/images/foot3.png",
"selectedIconPath": "static/images/foot3_on.png",
"text": "购物车"
},
{
"pagePath": "pages/discover/discover",
"iconPath": "static/images/foot4.png",
"selectedIconPath": "static/images/foot4_on.png",
"text": "发现"
},
{
"pagePath": "pages/user/user",
"iconPath": "static/images/foot5.png",
"selectedIconPath": "static/images/foot5_on.png",
"text": "我的"
}
]
}