kitchendDevice/components/tabbar.vue

91 lines
1.6 KiB
Vue
Raw Permalink Normal View History

2023-09-08 15:17:21 +08:00
<template>
<view class="tabbar">
<view class="list" v-for="(ite,ind) in list" :key="ind">
<image :src="ite.iconPath"></image>
<text>{{ite.text}}</text>
</view>
</view>
</template>
<script>
export default {
name: "tabbar",
data() {
return {
list: [{
"pagePath": "pages/index/index",
"iconPath": "../static/home.png",
"selectedIconPath": "../static/home01.png",
"text": "首页"
},
{
"pagePath": "pages/menu/menu",
"iconPath": "../static/cai.png",
"selectedIconPath": "../static/cai01.png",
"text": "菜谱"
},
{
"pagePath": "pages/add/add",
"iconPath": "../static/add.png",
"selectedIconPath": "../static/add.png",
"text": ""
},
{
"pagePath": "pages/count/count",
"iconPath": "../static/ji.png",
"selectedIconPath": "../static/ji01.png",
"text": "计食器"
},
{
"pagePath": "pages/me/me",
"iconPath": "../static/me.png",
"selectedIconPath": "../static/me01.png",
"text": "我的"
}
]
};
}
}
</script>
<style lang="scss" scoped>
.tabbar {
border-top: 1px solid #dfdfdf;
position: fixed;
left: 0;
right: 0;
height: 55px;
display: flex;
justify-content: space-between;
align-items: center;
bottom: 0;
.list {
display: flex;
flex-wrap: wrap;
justify-content: center;
image {
2025-11-25 14:21:22 +08:00
width: 50rpx;
height: 50rpx;
2023-09-08 15:17:21 +08:00
}
text {
display: inline-block;
width: 100%;
text-align: center;
}
}
:nth-child(3).list {
image {
width: 42px;
height: 42px;
}
}
}
</style>