Browse Source

弹框修复

bding 1 year ago
parent
commit
032b360056
1 changed files with 26 additions and 2 deletions
  1. 26 2
      src/views/cygx/internalDetials.vue

+ 26 - 2
src/views/cygx/internalDetials.vue

@@ -94,6 +94,12 @@ const handleImageClick = (event) => {
     wx.previewImage({ current: srcTag, urls: imgArray });
   }
 };
+
+// 关闭弹框
+const onClickHide = () => {
+  showDlg.value = false;
+};
+
 // 页面加载渲染
 onMounted(async () => {
   if (route.query.id) {
@@ -120,9 +126,12 @@ onMounted(async () => {
     <div id="report-content" class="content-abstract">摘要:{{ reportDetail.Abstract }}</div>
     <div v-html="reportDetail.Body"></div>
     <dlg :showTips="showTips" type="产品内测" @hideDlg="showTips = false" />
-    <van-dialog v-model:show="showDlg" :show-confirm-button="false">
+    <van-dialog v-model:show="showDlg" closeOnClickOverlay :show-confirm-button="false" @cancel="onClickHide">
       <view class="content-dialog">
-        <video width="320" height="240" :src="showLink.ActivityVideo.VideoUrl" controls></video>
+        <div class="close">
+          <Icon name="cross" color="#333" @click="onClickHide" />
+        </div>
+          <video width="320" height="200" :src="showLink.ActivityVideo.VideoUrl" controls></video>
       </view>
     </van-dialog>
   </div>
@@ -210,5 +219,20 @@ onMounted(async () => {
     white-space: pre-wrap;
     word-break: normal;
   }
+  .content-dialog {
+    position: relative;
+    font-size: 32px;
+    color: #666;
+    .close {
+      width: 100%;
+      display: flex;
+      justify-content: flex-end;
+      height: 60px;
+      padding: 20px 20px 0 20px;
+      .van-icon-cross {
+        float: right;
+      }
+    }
+  }
 }
 </style>