浏览代码

修復bug

tremble 3 年之前
父节点
当前提交
417398d538
共有 2 个文件被更改,包括 8 次插入6 次删除
  1. 1 1
      src/app.vue
  2. 7 5
      src/components/Controls/Panel/Main.vue

+ 1 - 1
src/app.vue

@@ -272,7 +272,7 @@ onMounted(async () => {
           }
         });
         if (e.data.type == "commodity" || e.data.type == "waterfall") {
-          e.target.style.zIndex = "999";
+          // e.target.style.zIndex = "999";
           e.target.querySelector(".tag-body").classList.add("show");
           e.target.querySelector(".tag-commodity").removeEventListener("click", onClickTagInfo);
           e.target.querySelector(".tag-commodity").addEventListener("click", onClickTagInfo);

+ 7 - 5
src/components/Controls/Panel/Main.vue

@@ -19,13 +19,13 @@
     </div>
 
     <div class="toolbar color">
-      <div class="navigation" v-if="brandlist.length>0">
+      <div class="navigation">
         <div class="h3">專櫃導航</div>
         <div class="swiper-container" id="sw-navigation">
           <ul class="swiper-wrapper" >
             <li class="swiper-slide" @click.stop="onClickShop(item)" v-for="(item, i) in brandlist" :key="i">
-              <img :src="item.shopLogo+'?rnd='+Math.random()" :key="i" alt="" />
-              <div>{{ item.shopName }}</div>
+              <div class="img" :style="{ 'background-image': `url(${item.shopLogo+'?rnd='+Math.random()})` }"></div>
+              <div class="name">{{ item.shopName }}</div>
             </li>
           </ul>
         </div>
@@ -364,10 +364,12 @@ onMounted(() => {
           position: relative;
           font-size: 0;
           overflow: hidden;
-          > img {
+          .img {
             width: 100%;
+            height: 100%;
+            background-size: contain;
           }
-          > div {
+          .name {
             width: 100%;
             position: absolute;
             bottom: -1px;