Browse Source

继续适配移动端

任一存 2 years ago
parent
commit
67d3f36b37
2 changed files with 8 additions and 13 deletions
  1. 2 1
      src/views/HistoryNew.vue
  2. 6 12
      src/views/Treasure.vue

+ 2 - 1
src/views/HistoryNew.vue

@@ -121,7 +121,8 @@ export default {
   setup () {
   setup () {
     const internalInstance = getCurrentInstance()
     const internalInstance = getCurrentInstance()
 
 
-    const spaceEachPerson = 220
+    // const spaceEachPerson = internalInstance.appContext.config.globalProperties.$isMobile ? 100 : 220
+    const spaceEachPerson = 100
 
 
     /**
     /**
      * 针对微信中背景视频无法自动播放的问题
      * 针对微信中背景视频无法自动播放的问题

+ 6 - 12
src/views/Treasure.vue

@@ -261,16 +261,15 @@ onBeforeUnmount(() => {
       cursor: pointer;
       cursor: pointer;
       &.tall {
       &.tall {
         height: 400px;
         height: 400px;
-        width: auto;
+        width: fit-content;
       }
       }
       &.fat {
       &.fat {
         height: 200px;
         height: 200px;
-        width: auto;
+        width: fit-content;
       }
       }
       > img {
       > img {
-        width: 100%;
+        width: auto;
         height: 100%;
         height: 100%;
-        object-fit: cover;
       }
       }
       >h3 {
       >h3 {
         position: absolute;
         position: absolute;
@@ -286,8 +285,6 @@ onBeforeUnmount(() => {
         line-height: 1.5;
         line-height: 1.5;
       }
       }
     }
     }
-    >.grid-item--width2 { width: 400px; }
-    >.grid-item--height2 { height: 400px; }
   }
   }
   .loading-mask {
   .loading-mask {
     position: absolute;
     position: absolute;
@@ -333,16 +330,15 @@ onBeforeUnmount(() => {
         cursor: pointer;
         cursor: pointer;
         &.tall {
         &.tall {
           height: calc(700 / 1080 * 83vh);
           height: calc(700 / 1080 * 83vh);
-          width: auto;
+          width: fit-content;
         }
         }
         &.fat {
         &.fat {
           height: calc(350 / 1080 * 83vh);
           height: calc(350 / 1080 * 83vh);
-          width: auto;
+          width: fit-content;
         }
         }
         > img {
         > img {
-          width: 100%;
+          width: auto;
           height: 100%;
           height: 100%;
-          object-fit: cover;
         }
         }
         >h3 {
         >h3 {
           position: absolute;
           position: absolute;
@@ -358,8 +354,6 @@ onBeforeUnmount(() => {
           line-height: 1.5;
           line-height: 1.5;
         }
         }
       }
       }
-      >.grid-item--width2 { width: calc(400 / 1080 * 83vh); }
-      >.grid-item--height2 { height: calc(400 / 1080 * 83vh); }
     }
     }
     .loading-mask {
     .loading-mask {
       position: absolute;
       position: absolute;