ソースを参照

fix(imagepreview): 样式冲突问题修复 (#697)

JackieScorpio 4 年 前
コミット
43d76a6e22

+ 3 - 3
src/packages/__VUE/imagepreview/index.scss

@@ -37,12 +37,12 @@
     background-color: transparent;
   }
 }
-.popup-center {
+.custom-pop {
   height: 100%;
   background: transparent !important;
   display: flex;
   align-items: center;
 }
-.nut-swiper-item {
-  height: 327px !important;
+.nut-imagepreview-swiper .nut-swiper-item {
+  height: 327px;
 }

+ 2 - 4
src/packages/__VUE/imagepreview/index.taro.vue

@@ -1,6 +1,6 @@
 <template>
   <view class="nut-imagepreview">
-    <nut-popup v-model:visible="showPop" @click="closePop">
+    <nut-popup pop-class="custom-pop" v-model:visible="showPop" @click="closePop">
       <swiper
         v-if="showPop"
         :autoplay="true"
@@ -13,9 +13,7 @@
           <img :src="item.imgSrc" class="nut-imagepreview-img" />
         </swiper-item>
       </swiper>
-      <view class="nut-imagepreview-index">
-        {{ active }} / {{ images.length }}
-      </view>
+      <view class="nut-imagepreview-index"> {{ active }} / {{ images.length }} </view>
     </nut-popup>
   </view>
 </template>

+ 2 - 4
src/packages/__VUE/imagepreview/index.vue

@@ -1,6 +1,6 @@
 <template>
   <view class="nut-imagepreview">
-    <nut-popup v-model:visible="showPop" @click="closePop">
+    <nut-popup pop-class="custom-pop" v-model:visible="showPop" @click="closePop">
       <nut-swiper
         v-if="showPop"
         :auto-play="3000"
@@ -13,9 +13,7 @@
           <img :src="item.imgSrc" class="nut-imagepreview-img" />
         </nut-swiper-item>
       </nut-swiper>
-      <view class="nut-imagepreview-index">
-        {{ active }} / {{ images.length }}
-      </view>
+      <view class="nut-imagepreview-index"> {{ active }} / {{ images.length }} </view>
     </nut-popup>
   </view>
 </template>