刘洋 2 سال پیش
والد
کامیت
cf93c0cd36
2فایلهای تغییر یافته به همراه32 افزوده شده و 17 حذف شده
  1. 31 16
      src/components/shared/ImagePreview.vue
  2. 1 1
      src/components/shared/message/MessageSend.vue

+ 31 - 16
src/components/shared/ImagePreview.vue

@@ -5,6 +5,7 @@
     title="试卷预览"
     :can-resize="'can-resize2'"
     :modal="false"
+    :width="'300px'"
     class="preview-dialog"
   >
     <div class="preview-content" :class="{ 'is-big': isBig }">
@@ -24,32 +25,46 @@ const props = defineProps<{
 }>()
 const visible = useVModel(props)
 </script>
-
+<style lang="scss">
+.preview-dialog {
+  display: flex;
+  flex-direction: column;
+  .el-dialog__body {
+    flex: 1;
+    .preview-content {
+      width: 100%;
+      height: 100%;
+    }
+  }
+}
+</style>
 <style scoped lang="scss">
 .preview-dialog {
-  margin-left: 70%;
+  // margin-left: 70%;
   .preview-content {
     width: 100%;
-    min-width: 250px;
+    // min-width: 250px;
     // max-width: 400px;
     text-align: center;
-    min-height: 40vh;
+    // min-height: 40vh;
     // max-height: 600px;
     // max-height: calc(50vh - 50px);
+    // height: 50vh;
+    // width: 300px;
     overflow: auto;
-    &.is-big {
-      max-width: 50vw;
-      height: calc(100vh - 50px);
-      img {
-        width: auto;
-        height: 99%;
-      }
-    }
+    // &.is-big {
+    //   max-width: 50vw;
+    //   height: calc(100vh - 50px);
+    //   img {
+    //     width: auto;
+    //     height: 99%;
+    //   }
+    // }
     img {
-      // width: 100%;
-      // height: 100%;
-      height: calc(50vh - 50px);
-      width: auto;
+      width: 100%;
+      height: 100%;
+      // height: calc(50vh - 50px);
+      // width: auto;
       object-fit: contain;
     }
   }

+ 1 - 1
src/components/shared/message/MessageSend.vue

@@ -116,7 +116,7 @@ const showSendPaper = computed<boolean>(() => {
 })
 
 const allowSend = computed<boolean>(() => {
-  return !!(messageContent.value && checkedUsers.value?.filter((v) => !!v.id)?.length)
+  return !!((messageContent.value && checkedUsers.value?.filter((v) => !!v.id)?.length) || replyUserId.value)
 })
 
 const treeRef = ref<InstanceType<typeof ElTree>>()