Browse Source

修复聊天列表key重复bug

master
xie.bx 3 years ago
parent
commit
28cac466b9
  1. 2
      im-ui/src/view/Chat.vue

2
im-ui/src/view/Chat.vue

@ -7,7 +7,7 @@
</el-input> </el-input>
</div> </div>
<el-scrollbar class="l-chat-list" > <el-scrollbar class="l-chat-list" >
<div v-for="(chat,index) in chatStore.chats" :key="chat.type+chat.targetId"> <div v-for="(chat,index) in chatStore.chats" :key="index">
<chat-item :chat="chat" :index="index" @click.native="handleActiveItem(index)" @del="handleDelItem(chat,index)" <chat-item :chat="chat" :index="index" @click.native="handleActiveItem(index)" @del="handleDelItem(chat,index)"
:active="index === chatStore.activeIndex"></chat-item> :active="index === chatStore.activeIndex"></chat-item>
</div> </div>

Loading…
Cancel
Save