13
This commit is contained in:
@@ -10,10 +10,10 @@
|
||||
<uni-icons class="selectedIcon" size="30" color="#07c160" type="checkbox-filled" v-if="selectClientMsgIDItems.indexOf(item.clientMsgID)>-1"></uni-icons>
|
||||
<uni-icons class="selectedIcon" size="30" color="#ccc" type="circle" v-else></uni-icons>
|
||||
</template>
|
||||
<message-item-render
|
||||
@messageItemRender="messageItemRender"
|
||||
<MessageItemRender
|
||||
@userEvent="onUserMessageEvent"
|
||||
:source="item"
|
||||
:conversationID="storeCurrentConversation.conversationID"
|
||||
:isSender="item.sendID === storeCurrentUserID"
|
||||
/>
|
||||
<!-- :isActive="selectClientMsgIDItems.indexOf(item.clientMsgID)>-1" -->
|
||||
@@ -88,18 +88,6 @@
|
||||
},
|
||||
methods: {
|
||||
...mapActions("message", ["getHistoryMesageList"]),
|
||||
messageItemRender(clientMsgID) {
|
||||
if (
|
||||
this.initFlag &&
|
||||
clientMsgID ===
|
||||
this.storeHistoryMessageList[this.storeHistoryMessageList.length - 1]
|
||||
.clientMsgID
|
||||
) {
|
||||
this.initFlag = false;
|
||||
setTimeout(() => this.scrollToBottom(true), 200);
|
||||
this.checkInitHeight();
|
||||
}
|
||||
},
|
||||
async loadMessageList(isLoadMore = false) {
|
||||
this.messageLoadState.loading = true;
|
||||
const lastMsgID = this.storeHistoryMessageList[0]?.clientMsgID;
|
||||
@@ -192,6 +180,16 @@
|
||||
});
|
||||
},
|
||||
onUserMessageEvent(e,data){
|
||||
if(e.type == 'messageItemRender'){
|
||||
if (
|
||||
this.initFlag && data === this.storeHistoryMessageList[this.storeHistoryMessageList.length - 1].clientMsgID
|
||||
) {
|
||||
this.initFlag = false;
|
||||
setTimeout(() => this.scrollToBottom(true), 200);
|
||||
this.checkInitHeight();
|
||||
}
|
||||
return ;
|
||||
}
|
||||
this.$emit('userEvent',e,data)
|
||||
},
|
||||
empty(){}
|
||||
|
||||
Reference in New Issue
Block a user