浏览代码

移动端兼容

jwyu 2 年之前
父节点
当前提交
8aaa7688b1
共有 2 个文件被更改,包括 5 次插入1 次删除
  1. 1 0
      package.json
  2. 4 1
      src/views/report/Index.vue

+ 1 - 0
package.json

@@ -10,6 +10,7 @@
     "preview": "vite preview"
   },
   "dependencies": {
+    "@vueuse/core": "^9.6.0",
     "axios": "^1.2.0",
     "element-plus": "^2.2.25",
     "normalize.css": "^8.0.1",

+ 4 - 1
src/views/report/Index.vue

@@ -2,6 +2,9 @@
 import {ref,reactive, onMounted} from 'vue'
 import { useRoute, useRouter } from "vue-router";
 import {apiReportClassifyList,apiReportList} from '@/api/report'
+import { useWindowSize } from '@vueuse/core'
+
+const { width, height } = useWindowSize()
 
 const router=useRouter()
 const route=useRoute()
@@ -208,7 +211,7 @@ let filterSize=ref('30%')
         </div>
 
         <!-- 关于 我们 -->
-        <div class="about-us-box" v-show="listState.firstClassifyId==0">
+        <div class="about-us-box" v-show="listState.firstClassifyId==0||(listState.firstClassifyId!=0&&width<768)">
             <div class="flex box top-box">
                 <div class="left">
                     <video controls autoplay loop src="https://hongze.oss-cn-shanghai.aliyuncs.com/static/video_03.mp4"></video>