Procházet zdrojové kódy

fix(标签栏): 调整标签栏徽标显示样式和默认值

将标签栏徽标的默认值从10改为100,并调整徽标样式以更好支持两位数显示
feige996 před 8 měsíci
rodič
revize
86bb37be77
2 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 1 1
      src/pages/about/about.vue
  2. 1 1
      src/tabbar/index.vue

+ 1 - 1
src/pages/about/about.vue

@@ -57,7 +57,7 @@ function gotoTabbar() {
 }
 // #region setTabbarBadge
 function setTabbarBadge() {
-  tabbarStore.setTabbarItemBadge(1, 10)
+  tabbarStore.setTabbarItemBadge(1, 100)
 }
 // #endregion
 </script>

+ 1 - 1
src/tabbar/index.vue

@@ -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>
               </template>