diff --git a/components/uni-im-conversation-list/uni-im-conversation-list.vue b/components/uni-im-conversation-list/uni-im-conversation-list.vue index 0f08a834a4180b84b0716b947a97a1d0dd6f13fc..a551dd45d78ea3f608cde3c0ba075f9433f5018c 100644 --- a/components/uni-im-conversation-list/uni-im-conversation-list.vue +++ b/components/uni-im-conversation-list/uni-im-conversation-list.vue @@ -11,7 +11,7 @@ @scroll="onScroll" > { - conversation.focus = false + this.focusConversationId = '' }) }, + closeConversationMenu(){ + const myContextmenu = this.$refs['uni-im-contextmenu'] + myContextmenu.closeMe() + }, async loadMore() { let data = await uniIm.conversation.loadMore() // console.log('加载到新的会话数据',data); diff --git a/pages/index/index.vue b/pages/index/index.vue index b612c671abd2dd3259565329b18ff5031280ee20..39f062e0bc539bddc6cbd3f73b6f6223a5d4ed19 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -305,6 +305,13 @@ }, onUnload() { }, + onBackPress(e) { + const clRef = this.$refs['uni-im-conversation-list'] + if(clRef.focusConversationId){ + clRef.closeConversationMenu() + return true + } + }, onHide() {}, methods: { clickMenu(data) {