소스 검색

Merge branch 'master' of http://192.168.0.115:3000/shaogen1995/WuZhongBWG

zhouenguang 3 년 전
부모
커밋
9c021844b1
1개의 변경된 파일13개의 추가작업 그리고 18개의 파일을 삭제
  1. 13 18
      webM/src/views/gui/component/antique.vue

+ 13 - 18
webM/src/views/gui/component/antique.vue

@@ -52,7 +52,9 @@
     <div class="model" v-if="modelShow">
       <div class="ifrCon" ref="ifrCon" :class="{ ifrConFull: fullscreen }">
         <!-- 全屏显示的标题 -->
-        <div class="fullTitle" v-if="fullscreen&&txtInfo.type !== 'img'">{{ txtInfo.name }}</div>
+        <div class="fullTitle" v-if="fullscreen && txtInfo.type !== 'img'">
+          {{ txtInfo.name }}
+        </div>
         <img
           :src="baseURL + txtInfo.thumb"
           alt=""
@@ -60,11 +62,7 @@
         />
         <iframe :src="mySrc" frameborder="0" v-else></iframe>
         <!-- 全屏按钮 -->
-        <div
-          class="fullM"
-          :class="{ fullX: fullscreen }"
-          @click="screen"
-        >
+        <div class="fullM" :class="{ fullX: fullscreen }" @click="screen">
           <img src="@/assets/img/close.png" alt="" v-if="fullscreen" />
           <img src="@/assets/img/tab3Full.png" alt="" v-else />
         </div>
@@ -115,11 +113,15 @@ export default {
   //监控data中的数据变化
   watch: {
     inputShow(val) {
-      if (val) {
-        setTimeout(() => {
+      setTimeout(() => {
+        let dom = document.querySelector(".orientation-tip");
+        if (val) {
           this.$refs.myInput.focus();
-        }, 100);
-      }
+          dom.style.display = "none";
+        } else {
+          dom.style.display = "";
+        }
+      }, 100);
     },
   },
   //方法集合
@@ -172,12 +174,7 @@ export default {
     window.myKeyBlank = true;
   },
   //生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {
-    this.$nextTick(() => {
-      let dom = document.querySelector(".orientation-tip");
-      dom.style.display = "none";
-    });
-  },
+  mounted() {},
   beforeCreate() {}, //生命周期 - 创建之前
   beforeMount() {}, //生命周期 - 挂载之前
   beforeUpdate() {}, //生命周期 - 更新之前
@@ -185,8 +182,6 @@ export default {
   beforeDestroy() {}, //生命周期 - 销毁之前
   destroyed() {
     window.myKeyBlank = false;
-    let dom = document.querySelector(".orientation-tip");
-    dom.style.display = "";
   }, //生命周期 - 销毁完成
   activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
 };