gemercheung 2 年之前
父节点
当前提交
4518f4f19b

+ 1 - 1
packages/qjkankan-view/src/components/assembly/MobileTags/metas/metas-image.vue

@@ -104,7 +104,7 @@ onUnmounted(() => {});
     .swiper-slide .swiper-zoom-container img {
       width: 100%;
       height: 100%;
-      object-fit: contain;
+      object-fit: scale-down;
     }
     // .swiper-slide .main-img {
     //   // display: block;

+ 3 - 3
packages/qjkankan-view/src/components/assembly/MobileTags/metas/metas-imagetext.vue

@@ -8,8 +8,8 @@
             type: 'fraction',
           }"
           :zoom="{
-            maxRatio: 10,
-            minRatio: 1,
+            maxRatio: 5,
+            minRatio:0.5,
           }"
           class="mySwiper"
           :modules="modules"
@@ -205,7 +205,7 @@ function handlePageRender(_, el) {
     .swiper-slide .swiper-zoom-container img {
       width: 100%;
       height: 100%;
-      object-fit: contain;
+      object-fit: scale-down;
     }
     // .swiper-slide .main-img {
     //   // display: block;

+ 7 - 6
packages/qjkankan-view/src/components/assembly/Tags/metas/metas-imagetext.vue

@@ -131,6 +131,7 @@ const hasAudio = computed(
     currentTag.value.imageTextInfo.audio.ossPath.length > 0
 );
 const scaleRate = ref(1);
+const maxScaleRate = ref(5);
 
 const objectFit = ref("scale-down");
 
@@ -150,8 +151,8 @@ const currentIndex = ref(0);
 const onImageWheel = (e) => {
   if (e.deltaY < 0) {
     let scle = scaleRate.value * 1.1;
-    if (scle > 2) {
-      scaleRate.value = 2;
+    if (scle > maxScaleRate.value) {
+      scaleRate.value = maxScaleRate.value;
     } else {
       scaleRate.value = scle;
     }
@@ -166,7 +167,7 @@ const onImageWheel = (e) => {
 };
 
 const onClickZoomIn = () => {
-  scaleRate.value = Math.min(scaleRate.value * 1.1, 2);
+  scaleRate.value = Math.min(scaleRate.value * 1.1, maxScaleRate.value);
 };
 const onClickZoomOut = () => {
   scaleRate.value = Math.max(scaleRate.value * 0.9, 0.5);
@@ -289,8 +290,8 @@ watchEffect(() => {
     display: flex;
 
     .image-left {
-      flex: 1 1 76.8%;;
-      
+      flex: 1 1 76.8%;
+
       overflow: hidden;
       position: relative;
       background: rgba(0, 0, 0, 1);
@@ -300,7 +301,7 @@ watchEffect(() => {
       overflow: hidden;
       color: white;
       overflow-y: scroll;
-      background-color: rgba(0, 0, 0, 0.80);
+      background-color: rgba(0, 0, 0, 0.8);
       .txtbody {
         display: block;
         word-wrap: break-word;