Răsfoiți Sursa

Merge branch 'redesign‌-260706' of git.huaml.com:zhh/front-end into redesign‌-260706

shizhongqi 18 ore în urmă
părinte
comite
8a0ee57366
2 a modificat fișierele cu 37 adăugiri și 26 ștergeri
  1. 18 13
      hdApp/src/admin/goods/add.vue
  2. 19 13
      hdApp/src/admin/goods/detail.vue

+ 18 - 13
hdApp/src/admin/goods/add.vue

@@ -16,15 +16,14 @@
 
         <view class="spec-switch-card">
           <view class="spec-switch-left">
-            <view class="spec-switch-icon"></view>
+            <view class="spec-switch-icon"></view>
             <view>
-              <view class="spec-switch-title">启用多规格</view>
-              <view class="spec-switch-desc">开启后可设置商品多规格属性</view>
+              <view class="spec-switch-title">多规格</view>
             </view>
           </view>
           <view class="spec-switch-right">
-            <switch :checked="form.specEnabled == 1" @change="toggleSpecs" color="#09C567" />
-            <text>{{ form.specEnabled == 1 ? '已开启' : '未开启' }}</text>
+            <text>{{ form.specEnabled == 1 ? '已启用' : '未启用' }}</text>
+            <switch class="spec-switch-ctrl" :checked="form.specEnabled == 1" @change="toggleSpecs" color="#09C567" />
           </view>
         </view>
 
@@ -972,7 +971,7 @@ export default {
 }
 .spec-switch-card {
   margin: 0 20upx 20upx;
-  padding: 28upx 30upx;
+  padding: 10upx 30upx;
   border: 1px solid #e5f5ec;
   border-radius: 12upx;
   background: linear-gradient(90deg, #f3fff8 0%, #ffffff 100%);
@@ -987,18 +986,19 @@ export default {
   min-width: 0;
 }
 .spec-switch-icon {
-  width: 72upx;
-  height: 72upx;
+  width: 40upx;
+  height: 40upx;
   margin-right: 22upx;
   border-radius: 50%;
   background: #09C567;
   color: #ffffff;
-  font-size: 46upx;
-  line-height: 72upx;
-  text-align: center;
+  font-size: 28upx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
 }
 .spec-switch-title {
-  font-size: 34upx;
+  font-size: 32upx;
   color: #222222;
   font-weight: 700;
   line-height: 44upx;
@@ -1015,7 +1015,12 @@ export default {
   color: #999999;
   font-size: 24upx;
   text {
-    margin-left: 12upx;
+    margin-right: 12upx;
+  }
+  /* uni-app switch 无尺寸属性,用缩放缩小 */
+  .spec-switch-ctrl {
+    transform: scale(0.75);
+    transform-origin: center right;
   }
 }
 .spec-wrap {

+ 19 - 13
hdApp/src/admin/goods/detail.vue

@@ -17,15 +17,14 @@
 
         <view class="spec-switch-card">
           <view class="spec-switch-left">
-            <view class="spec-switch-icon"></view>
+            <view class="spec-switch-icon"></view>
             <view>
-              <view class="spec-switch-title">启用多规格</view>
-              <view class="spec-switch-desc">开启后可设置商品多规格属性</view>
+              <view class="spec-switch-title">多规格</view>
             </view>
           </view>
           <view class="spec-switch-right">
-            <switch :checked="form.specEnabled == 1" @change="toggleSpecs" color="#09C567" />
-            <text>{{ form.specEnabled == 1 ? '已开启' : '未开启' }}</text>
+            <text>{{ form.specEnabled == 1 ? '已启用' : '未启用' }}</text>
+            <switch class="spec-switch-ctrl" :checked="form.specEnabled == 1" @change="toggleSpecs" color="#09C567" />
           </view>
         </view>
 
@@ -1176,7 +1175,7 @@ export default {
 
 .spec-switch-card {
   margin: 0 20upx 20upx;
-  padding: 28upx 30upx;
+  padding: 10upx 30upx;
   border: 1px solid #e5f5ec;
   border-radius: 12upx;
   background: linear-gradient(90deg, #f3fff8 0%, #ffffff 100%);
@@ -1193,19 +1192,20 @@ export default {
 }
 
 .spec-switch-icon {
-  width: 72upx;
-  height: 72upx;
+  width: 40upx;
+  height: 40upx;
   margin-right: 22upx;
   border-radius: 50%;
   background: #09C567;
   color: #ffffff;
-  font-size: 46upx;
-  line-height: 72upx;
-  text-align: center;
+  font-size: 28upx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
 }
 
 .spec-switch-title {
-  font-size: 34upx;
+  font-size: 32upx;
   color: #222222;
   font-weight: 700;
   line-height: 44upx;
@@ -1225,7 +1225,13 @@ export default {
   font-size: 24upx;
 
   text {
-    margin-left: 12upx;
+    margin-right: 12upx;
+  }
+
+  /* uni-app switch 无尺寸属性,用缩放缩小 */
+  .spec-switch-ctrl {
+    transform: scale(0.75);
+    transform-origin: center right;
   }
 }