shaogen1995 2 éve
szülő
commit
5cb6210d76

+ 1 - 1
文物展示系统/vueapp/src/assets/style/reset.css

@@ -46,7 +46,7 @@ table {
 	border-spacing: 0;
 }
 
-@media screen and (max-width: 1000px) {
+@media screen and (max-width: 1600px) {
   *{
 		box-sizing: border-box;
 	}

+ 1 - 1
文物展示系统/vueapp/src/components/CollectionSwiper.vue

@@ -114,7 +114,7 @@ const modules = [Grid, FreeMode, Mousewheel];
     }
   }
 }
-@media screen and (max-width: 1000px) {
+@media screen and (max-width: 1600px) {
   .swiper {
     .swiper-slide {
       width: 200px;

+ 1 - 1
文物展示系统/vueapp/src/components/Directory.vue

@@ -213,7 +213,7 @@ onMounted(() => {
 
   }
 }
-@media screen and (max-width: 1000px) {
+@media screen and (max-width: 1600px) {
   .i-name {
     display: none !important;
   }

+ 1 - 1
文物展示系统/vueapp/src/components/detail/ThreeDetail.vue

@@ -261,7 +261,7 @@ const modules = [Grid, FreeMode, Mousewheel];
   }
 }
 
-@media screen and (max-width: 1000px) {
+@media screen and (max-width: 1600px) {
   .two-hp {
     .content {
       width: 96%;

+ 1 - 1
文物展示系统/vueapp/src/components/detail/TwoDetail.vue

@@ -280,7 +280,7 @@ watch(currentIfr, () => {
     }
   }
 }
-@media screen and (max-width: 1000px) {
+@media screen and (max-width: 1600px) {
   .two-hp {
     .i-name {
       display: none !important;

+ 1 - 1
文物展示系统/vueapp/src/views/cultural-relic.vue

@@ -139,7 +139,7 @@ const activeIdx = ref("three");
     }
   }
 }
-@media screen and (max-width: 1000px) {
+@media screen and (max-width: 1600px) {
   .collection {
     .c-header {
       z-index: 100;

+ 39 - 10
文物展示系统/vueapp/src/views/home.vue

@@ -99,6 +99,33 @@ let list = three.data.concat(
 
 console.log("result:", list);
 
+let timeRef = -1;
+
+const resizeFu = () => {
+  const width = window.innerWidth;
+  const height = window.innerHeight;
+  const dom = document.querySelector(".toHengBox");
+  if (width >= height) {
+    // 横屏
+    dom.style.opacity = 0;
+    dom.style.pointerEvents = "none";
+  } else {
+    // 竖屏
+    dom.style.opacity = 1;
+    dom.style.pointerEvents = "auto";
+  }
+};
+
+onMounted(() => {
+  resizeFu();
+  window.addEventListener("resize", () => {
+    clearTimeout(timeRef);
+    timeRef = window.setTimeout(() => {
+      resizeFu();
+    }, 500);
+  });
+});
+
 const isMouseDown = ref(false);
 const lastMoveEventTimeStamp = ref(0);
 const moveSpeed = ref(0);
@@ -293,9 +320,8 @@ onBeforeUnmount(() => {
         .logo {
           position: absolute;
           width: 160px;
-          top: 26%;
-          left: 50%;
-          transform: translateX(-50%);
+          top: 30px;
+          left: 30px;
         }
 
         .title {
@@ -367,10 +393,13 @@ onBeforeUnmount(() => {
   display: none;
 }
 
-@media screen and (max-width: 1000px) {
+@media screen and (max-width: 1600px) {
   .l-con {
     .logo {
       width: 100px !important;
+      top: 26% !important;
+      left: 50% !important;
+      transform: translateX(-50%);
     }
   }
   .home .h-con .h-right > ul > li {
@@ -405,10 +434,10 @@ onBeforeUnmount(() => {
   }
 }
 /*竖屏*/
-@media screen and (orientation: portrait) {
-  .toHengBox {
-    opacity: 1;
-    pointer-events: auto;
-  }
-}
+// @media screen and (orientation: portrait) {
+//   .toHengBox {
+//     opacity: 1;
+//     pointer-events: auto;
+//   }
+// }
 </style>