no message

This commit is contained in:
kuaifan 2025-04-24 21:51:07 +08:00
parent 35b7e3a289
commit 508cc2bd91
4 changed files with 20 additions and 20 deletions

View File

@ -1305,7 +1305,7 @@ export default {
onClickEditor() { onClickEditor() {
this.clearSearchKey() this.clearSearchKey()
this.updateEmojiQuick(this.value) this.updateEmojiQuick(this.value)
this.focus() !this.isFocus && this.focus()
inputLoadAdd(this._uid) inputLoadAdd(this._uid)
}, },

View File

@ -262,13 +262,16 @@
</div> </div>
</div> </div>
<div v-if="activeNum > 0 && routeName === 'manage-messenger'" class="messenger-msg"> <template v-if="activeNum > 0 && routeName === 'manage-messenger'">
<div class="messenger-line"></div>
<div class="messenger-msg">
<div class="msg-dialog-bg"> <div class="msg-dialog-bg">
<div class="msg-dialog-bg-icon"><Icon type="ios-chatbubbles" /></div> <div class="msg-dialog-bg-icon"><Icon type="ios-chatbubbles" /></div>
<div class="msg-dialog-bg-text">{{$L('选择一个会话开始聊天')}}</div> <div class="msg-dialog-bg-text">{{$L('选择一个会话开始聊天')}}</div>
</div> </div>
<DialogWrapper v-if="windowLandscape && dialogId > 0" :dialogId="dialogId" @on-active="scrollIntoActive" :auto-focus="$A.isDesktop()" location="messenger"/> <DialogWrapper v-if="windowLandscape && dialogId > 0" :dialogId="dialogId" @on-active="scrollIntoActive" :auto-focus="$A.isDesktop()" location="messenger"/>
</div> </div>
</template>
</div> </div>
</div> </div>
</template> </template>

View File

@ -4214,14 +4214,14 @@ export default {
break; break;
case 'add': case 'add':
case 'chat': case 'chat':
const isChat = mode === "chat" || $A.isSubElectron; const isAdd = mode === "add";
if (!state.dialogMsgs.find(({id}) => id == data.id)) { if (!state.dialogMsgs.find(({id}) => id == data.id)) {
// 新增任务消息数量 // 新增任务消息数量
dispatch("increaseTaskMsgNum", {id: data.dialog_id}); dispatch("increaseTaskMsgNum", {id: data.dialog_id});
// 新增回复数量 // 新增回复数量
dispatch("increaseMsgReplyNum", {id: data.reply_id}); dispatch("increaseMsgReplyNum", {id: data.reply_id});
// //
if (!isChat) { if (isAdd) {
if (data.userid !== state.userId) { if (data.userid !== state.userId) {
// 更新对话新增未读数 // 更新对话新增未读数
const dialog = state.cacheDialogs.find(({id}) => id == dialog_id); const dialog = state.cacheDialogs.find(({id}) => id == dialog_id);
@ -4249,7 +4249,7 @@ export default {
// 更新消息列表 // 更新消息列表
dispatch("saveDialogMsg", data) dispatch("saveDialogMsg", data)
// 更新最后消息 // 更新最后消息
!isChat && dispatch("updateDialogLastMsg", data); isAdd && dispatch("updateDialogLastMsg", data);
return; return;
} }
setTimeout(() => saveMsg(data, count + 1), 50); setTimeout(() => saveMsg(data, count + 1), 50);

View File

@ -547,22 +547,18 @@
} }
} }
} }
.messenger-line {
flex-shrink: 0;
width: 1px;
height: 100%;
background-color: #f4f5f5;
}
.messenger-msg { .messenger-msg {
flex: 1; flex: 1;
width: 0; width: 0;
height: 100%; height: 100%;
display: flex; display: flex;
position: relative; position: relative;
&:before {
content: "";
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 1px;
background-color: #f4f5f5;
z-index: 2;
}
.msg-dialog-bg { .msg-dialog-bg {
position: absolute; position: absolute;
top: 0; top: 0;
@ -727,6 +723,7 @@ body.window-portrait {
} }
} }
} }
.messenger-line,
.messenger-msg { .messenger-msg {
display: none; display: none;
} }