This commit is contained in:
杨鹏
2025-09-09 22:07:09 +08:00
parent 4e5d687c18
commit 1a1bbec15c
9 changed files with 404 additions and 9 deletions
+2 -2
View File
@@ -212,8 +212,8 @@
});
const searchModel = computed(() => {
return props.defaultSearch
})
return props.defaultSearch;
});
const themeBgColor = computed(() => {
if (props.dark) {
+2 -1
View File
@@ -89,7 +89,8 @@
const titleStyle = computed(() => uiTabProvide?.props?.titleStyle);
const computedQuery = () => {
uni.createSelectorQuery()
uni
.createSelectorQuery()
.in(vm)
.select('#tab-' + props.index)
.boundingClientRect((data) => {
+17 -4
View File
@@ -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,