Quellcode durchsuchen

fix: 按钮添加 max-width/max-height/flex-shrink/box-sizing 强制圆形

微信 button 组件默认样式可能撑开,用多重约束确保 400rpx 正圆。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
skyline vor 2 Wochen
Ursprung
Commit
edd76e4929
1 geänderte Dateien mit 12 neuen und 0 gelöschten Zeilen
  1. 12 0
      haha-mp/src/pages/index/index.vue

+ 12 - 0
haha-mp/src/pages/index/index.vue

@@ -305,12 +305,19 @@ const onContactSuccess = () => logger.log('[首页] 客服会话已打开')
   position: relative;
   width: 400rpx;
   height: 400rpx;
+  min-width: 400rpx;
+  max-width: 400rpx;
+  min-height: 400rpx;
+  max-height: 400rpx;
   border-radius: 50%;
   background: transparent;
   border: none;
   padding: 0;
   margin: 0;
   overflow: hidden;
+  box-sizing: border-box;
+  flex-shrink: 0;
+  line-height: 1;
 
   &::after { border: none; }
 
@@ -367,13 +374,18 @@ const onContactSuccess = () => logger.log('[首页] 客服会话已打开')
   width: 400rpx;
   height: 400rpx;
   min-width: 400rpx;
+  max-width: 400rpx;
   min-height: 400rpx;
+  max-height: 400rpx;
   border-radius: 50%;
   background: transparent;
   border: none;
   padding: 0;
   margin: 0;
   overflow: hidden;
+  box-sizing: border-box;
+  flex-shrink: 0;
+  line-height: 1;
 
   &::after { border: none; }