mirror of
https://gitee.com/lijingbo-2021/open-anylink-web.git
synced 2026-05-21 22:58:01 +00:00
message页面销毁时清除messageStore缓存
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<!-- eslint-disable prettier/prettier -->
|
||||
<script setup>
|
||||
import { ref, onMounted, computed, watch, nextTick } from 'vue'
|
||||
import { ref, onMounted, onUnmounted, computed, watch, nextTick } from 'vue'
|
||||
import {
|
||||
Phone,
|
||||
VideoCamera,
|
||||
@@ -80,6 +80,10 @@ onMounted(async () => {
|
||||
if (userData.curSessionId) pullMsg() //页面加载进来,如果缓存了sessionId,则要加载对话
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
messageData.clear()
|
||||
})
|
||||
|
||||
const handleMsgListScroll = async () => {
|
||||
if (msgListDiv.value.scrollTop === 0) {
|
||||
const scrollHeight = msgListDiv.value.scrollHeight
|
||||
|
||||
Reference in New Issue
Block a user