Prechádzať zdrojové kódy

fix: bamboo position fail

chenlei 1 rok pred
rodič
commit
eb19a0c12e
1 zmenil súbory, kde vykonal 36 pridanie a 34 odobranie
  1. 36 34
      src/views/BambooHotView2/index.vue

+ 36 - 34
src/views/BambooHotView2/index.vue

@@ -185,48 +185,50 @@
         <img src="./images/bamboo12.png">
       </div>
 
-      <div
-        class="bamboo-hot2-b13"
-        :class="{
-          hide: hotVisible && checkedHotId !== 13
-        }"
-      >
-        <img
-          src="./images/bamboo13.png"
-          @load="handleBambooOffset(13)"
+      <template v-if="bgImgLoaded">
+        <div
+          class="bamboo-hot2-b13"
+          :class="{
+            hide: hotVisible && checkedHotId !== 13
+          }"
         >
-      </div>
-      <div
-        class="bamboo-hot2__hot b13"
-        :class="{
-          hide: hotVisible
-        }"
-        @click="handleHot(13)"
-      >
-        <p>梅鹿竹</p>
-      </div>
-
-      <div
-        class="bamboo-hot2-b14"
-        :class="{
-          hide: hotVisible && checkedHotId !== 14
-        }"
-      >
-        <img
-          src="./images/bamboo14.png"
-          @load="handleBambooOffset(14)"
+          <img
+            src="./images/bamboo13.png"
+            @load="handleBambooOffset(13)"
+          >
+        </div>
+        <div
+          class="bamboo-hot2__hot b13"
+          :class="{
+            hide: hotVisible
+          }"
+          @click="handleHot(13)"
         >
+          <p>梅鹿竹</p>
+        </div>
 
         <div
-          class="bamboo-hot2__hot"
+          class="bamboo-hot2-b14"
           :class="{
-            hide: hotVisible
+            hide: hotVisible && checkedHotId !== 14
           }"
-          @click="handleHot(14)"
         >
-          <p>紫竹</p>
+          <img
+            src="./images/bamboo14.png"
+            @load="handleBambooOffset(14)"
+          >
+
+          <div
+            class="bamboo-hot2__hot"
+            :class="{
+              hide: hotVisible
+            }"
+            @click="handleHot(14)"
+          >
+            <p>紫竹</p>
+          </div>
         </div>
-      </div>
+      </template>
 
       <div
         ref="bambooWrapBg"