Browse Source

修复群成员信息不显示的bug

master
xie.bx 3 years ago
parent
commit
c443675e05
  1. 6
      im-ui/src/components/chat/ChatBox.vue
  2. 2
      im-ui/src/store/chatStore.js

6
im-ui/src/components/chat/ChatBox.vue

@ -382,7 +382,7 @@
watch: {
chat: {
handler(newChat, oldChat) {
if (newChat.targetId > 0 && (newChat.type != oldChat.type || newChat.targetId != oldChat.targetId)) {
if (newChat.targetId > 0 && (!oldChat || newChat.type != oldChat.type || newChat.targetId != oldChat.targetId)) {
if (this.chat.type == "GROUP") {
this.loadGroup(this.chat.targetId);
} else {
@ -391,10 +391,12 @@
this.scrollToBottom();
this.sendText = "";
//
this.$nextTick(() => {
this.$refs.sendBox.focus();
})
}
},
deep: true
immediate: true
}
}
}

2
im-ui/src/store/chatStore.js

@ -7,7 +7,7 @@ export default {
mutations: {
initChatStore(state) {
state.activeIndex = -1;
//state.activeIndex = -1;
},
openChat(state, chatInfo) {
let chat = null;

Loading…
Cancel
Save