Commit abd55672 authored by lijiongliang's avatar lijiongliang

tabbar修改

parent 1160d95a
<template> <template>
<view class="weui-tabbar" :class="extClass"> <view class="weui-tabbar" :class="extClass">
<view @click="tabChange(index)" v-for="(item, index) in list" :key="index" class="weui-tabbar__item" :class="[{'weui-bar__item_on':index === current},{'flexd__icon':index===2}]"> <view @click="tabChange(index)" v-for="(item, index) in list" :key="index" class="weui-tabbar__item" :class="[{'weui-bar__item_on':index === current},{'flexd__icon':index===2}]">
<view style="position: relative;display:inline-block;"><image :src="current === index ? item.selectedIconPath : item.iconPath" class="weui-tabbar__icon"></image></view> <view style="position: relative;display:inline-block;">
<image :src="current === index ? item.selectedIconPath : item.iconPath" class="weui-tabbar__icon" v-if="index !== 2"></image>
<image src="/static/tarbar/index31.png" v-else class="weui-tabbar__icon2"></image>
</view>
<view class="weui-tabbar__label">{{ item.text }}</view> <view class="weui-tabbar__label">{{ item.text }}</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
...@@ -48,19 +51,24 @@ export default { ...@@ -48,19 +51,24 @@ export default {
box-shadow: 0px 8rpx 19rpx 2rpx rgba(215, 215, 215, 0.21); box-shadow: 0px 8rpx 19rpx 2rpx rgba(215, 215, 215, 0.21);
} }
.flexd__icon{ .flexd__icon{
position: relative; // position: relative;
top: -30rpx; // top: -30rpx;
left: 0; // left: 0;
right: 0; // right: 0;
text-align: center; // text-align: center;
margin: 0 auto; // margin: 0 auto;
background: url('../../static/tarbar/index31.png') center center no-repeat; // background: url('../../static/tarbar/index31.png') center center no-repeat;
background-size: contain; // background-size: contain;
width: 54rpx; // width: 54rpx !important;
height: 54rpx; // height: 54rpx !important;
.weui-tabbar__icon2{
width:86rpx;height:86rpx;
position: relative;
top:-40rpx;
}
>.weui-tabbar__label{ >.weui-tabbar__label{
position: relative; position: relative;
bottom:-30rpx; bottom:36rpx;
} }
} }
.weui-tabbar:before { .weui-tabbar:before {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment