lex 2 lat temu
rodzic
commit
afc2fbf4a4

+ 14 - 12
src/layout/components/components/message-editor.vue

@@ -73,9 +73,7 @@ export default {
       connected: true,
       content: "",
       conversation: {},
-      referenceMessage: {},
-      imageInputRef: null,
-      fileInputRef: null
+      referenceMessage: {}
     };
   },
   mounted() {
@@ -237,15 +235,15 @@ export default {
         return;
       }
       // 获取之前的草稿
-      getTextMessageDraft(this.conversation).then(res => {
-        if (res.code === 0) {
-          if (res.data) {
-            this.draft = { time: Date.now(), text: res.data };
-            this.content = this.draft.text;
-          }
-          clearTextMessageDraft(this.conversation);
-        }
-      });
+      // getTextMessageDraft(this.conversation).then(res => {
+      //   if (res.code === 0) {
+      //     if (res.data) {
+      //       this.draft = { time: Date.now(), text: res.data };
+      //       this.content = this.draft.text;
+      //     }
+      //     clearTextMessageDraft(this.conversation);
+      //   }
+      // });
     }
   },
   destroyed() {
@@ -324,10 +322,14 @@ export default {
 .editor-tool-bar {
   .buttons {
     .button {
+      position: relative;
       input {
         display: none;
       }
       .label {
+        position: absolute;
+        top: 0;
+        left: 0;
         display: block;
         width: 28px;
         padding: 28px 0 0;

+ 5 - 3
src/layout/components/modal/chat-model.vue

@@ -86,7 +86,9 @@
         />
       </el-aside>
       <!-- 判断是否有会话 -->
-      <el-container v-show="currentConversation.targetId">
+      <el-container
+        v-show="currentConversation.targetId && active === 'conversation'"
+      >
         <el-main style="padding: 0" id="el-main">
           <message-list ref="messageList"></message-list>
         </el-main>
@@ -97,7 +99,7 @@
         </el-footer>
       </el-container>
       <el-empty
-        v-if="!currentConversation.targetId"
+        v-if="!currentConversation.targetId || active !== 'conversation'"
         :image="emptyImg"
         style="width: 100%;height: 100%"
         description=" "
@@ -167,7 +169,7 @@ export default {
       console.log(item, "item");
       core.selectConversation({
         conversationType: item.conversationType,
-        targetId: item.targetId,
+        targetId: item.targetId + "",
         channelId: item.channelId
       });
       this.active = "conversation";