You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.1 KiB
48 lines
1.1 KiB
2 years ago
|
<template>
|
||
|
<view class="tabber">
|
||
|
<view v-for='(item,index) in list'>
|
||
|
<image :src="(index+1)==Number(xzindex)?item.xzicon:item.icon"></image>
|
||
|
<view>{{item.name}}</view>
|
||
|
</view>
|
||
|
</view>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
import {ref} from 'vue'
|
||
|
export default {
|
||
|
name:"Tabber",
|
||
|
props:['xzindex'],
|
||
|
setup(){
|
||
|
let list=ref([
|
||
|
{name:'首页',icon:'/static/home.png',xzicon:'/static/homexz.png',path:'/pages/index/index'},
|
||
|
{name:'首页',icon:'/static/home.png',xzicon:'/static/homexz.png',path:'/pages/index/index'},
|
||
|
{name:'首页',icon:'/static/home.png',xzicon:'/static/homexz.png',path:'/pages/index/index'},
|
||
|
{name:'首页',icon:'/static/home.png',xzicon:'/static/homexz.png',path:'/pages/index/index'},
|
||
|
{name:'首页',icon:'/static/home.png',xzicon:'/static/homexz.png',path:'/pages/index/index'}
|
||
|
])
|
||
|
return {
|
||
|
list
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style lang="scss">
|
||
|
.tabber{
|
||
|
display: flex;
|
||
|
position: fixed;
|
||
|
bottom: 0;
|
||
|
left: 0;
|
||
|
width: 100%;
|
||
|
height: 120upx;
|
||
|
>view{
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
align-items: center;
|
||
|
>image{
|
||
|
width: 40upx;
|
||
|
height: 40upx;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</style>
|