ソースを参照

页面设计商品组支持商品名称行数

萤火科技 1 年間 前
親
コミット
11be13c688

+ 7 - 0
src/views/page/modules/editor/Editor.vue

@@ -732,6 +732,13 @@
                   <colorPicker v-model="curItem.style.sellingColor" defaultColor="#e3771f" />
                 </div>
               </div>
+              <div class="block-item">
+                <span class="label">商品名称</span>
+                <a-radio-group buttonStyle="solid" v-model="curItem.style.goodsNameRows">
+                  <a-radio-button value="one">单行</a-radio-button>
+                  <a-radio-button value="two">双行</a-radio-button>
+                </a-radio-group>
+              </div>
               <template v-if="inArray('cartBtn', curItem.style.show)">
                 <div class="block-item">
                   <span class="label">购物车按钮样式</span>

+ 9 - 7
src/views/page/modules/phone/Phone.vue

@@ -267,7 +267,8 @@
                       <div class="goods-info">
                         <div
                           v-if="inArray('goodsName', item.style.show)"
-                          class="goods-name twoline-hide"
+                          class="goods-name"
+                          :class="[ item.style.goodsNameRows == 'two' ? 'twoline-hide' : 'oneline-hide', `row-${item.style.goodsNameRows}` ]"
                         >{{ dataItm.goods_name }}</div>
                         <div v-if="inArray('sellingPoint', item.style.show)" class="goods-selling">
                           <span
@@ -321,7 +322,8 @@
                   <div class="goods-info">
                     <div
                       v-if="inArray('goodsName', item.style.show)"
-                      class="goods-name twoline-hide"
+                      class="goods-name"
+                      :class="[ item.style.goodsNameRows == 'two' ? 'twoline-hide' : 'oneline-hide', `row-${item.style.goodsNameRows}` ]"
                     >{{ dataItm.goods_name }}</div>
                     <div v-if="inArray('sellingPoint', item.style.show)" class="goods-selling">
                       <span
@@ -355,11 +357,11 @@
                         v-show="inArray('cartBtn', item.style.show) && item.style.column < 3"
                         class="action"
                       >
-                        <div
-                          class="btn-cart"
-                          :style="{ background: item.style.btnCartColor, color: item.style.btnFontColor }"
-                        >
-                          <a-icon class="cart-icon" :component="PageIcon.plus" />
+                        <div class="btn-cart" :style="{ color: item.style.btnCartColor }">
+                          <a-icon
+                            class="cart-icon"
+                            :component="PageIcon[`jiagou${item.style.btnCartStyle}`]"
+                          />
                         </div>
                       </div>
                     </div>

+ 10 - 1
src/views/page/modules/phone/style.less

@@ -515,6 +515,12 @@ dl {
               .goods-name {
                 font-size: 13.5px;
               }
+
+              .footer {
+                position: absolute;
+                bottom: 8px;
+                width: 100%;
+              }
             }
 
           }
@@ -606,8 +612,11 @@ dl {
               font-size: 13px;
               color: #000;
               margin-bottom: 4px;
-              min-height: 34px; // 用户端
               line-height: 1.3; // 用户端
+
+              &.row-two {
+                min-height: 34px; // 用户端
+              }
             }
 
             .goods-selling {