.
This commit is contained in:
@@ -24,9 +24,22 @@
|
||||
<slot v-else name="inactive-icon" />
|
||||
</block>
|
||||
</uni-badge>
|
||||
</view>
|
||||
|
||||
<slot name="text">
|
||||
<!-- 选中的当前tabbar加上下横线 -->
|
||||
<view
|
||||
:style="{
|
||||
width: '20rpx',
|
||||
height: '1rpx',
|
||||
background: '#000',
|
||||
position: 'absolute',
|
||||
left: 'calc(50% - 10rpx)',
|
||||
bottom: '-5rpx',
|
||||
display: isActive ? 'inline-block' : 'none',
|
||||
}"
|
||||
/>
|
||||
</view>
|
||||
<!-- 底部tabbar不要文字 -->
|
||||
<!-- <slot name="text">
|
||||
<text
|
||||
class="u-tabbar-item__text"
|
||||
:style="{
|
||||
@@ -35,7 +48,7 @@
|
||||
>
|
||||
{{ text }}
|
||||
</text>
|
||||
</slot>
|
||||
</slot> -->
|
||||
</template>
|
||||
</view>
|
||||
</template>
|
||||
@@ -104,7 +117,7 @@
|
||||
// 控制徽标的位置,对象或者字符串形式,可以设置top和right属性
|
||||
badgeStyle: {
|
||||
type: Object,
|
||||
default: ()=>{},
|
||||
default: () => {},
|
||||
},
|
||||
isCenter: {
|
||||
type: Boolean,
|
||||
|
||||
Reference in New Issue
Block a user