将标签栏徽标的默认值从10改为100,并调整徽标样式以更好支持两位数显示
@@ -57,7 +57,7 @@ function gotoTabbar() {
}
// #region setTabbarBadge
function setTabbarBadge() {
- tabbarStore.setTabbarItemBadge(1, 10)
+ tabbarStore.setTabbarItemBadge(1, 100)
// #endregion
</script>
@@ -109,7 +109,7 @@ function getImageByIndex(index: number, item: CustomTabBarItem) {
<view class="absolute right-0 top-0 h-2 w-2 rounded-full bg-#f56c6c" />
</template>
<template v-else>
- <view class="absolute right-0 top-0 h-4 w-4 center rounded-full bg-#f56c6c text-center text-xs text-white">
+ <view class="absolute right-0 top-0 box-border h-5 min-w-5 center rounded-full bg-#f56c6c px-1 text-center text-xs text-white">
{{ item.badge > 99 ? '99+' : item.badge }}
</view>