clearInterval(statusReqTask) 这个状态查询其他地方可能需要用到结果,因此这里不释放

This commit is contained in:
bob
2024-10-24 15:36:07 +08:00
parent e918a3e0d6
commit dfa02f14f3

View File

@@ -1,6 +1,6 @@
<!-- eslint-disable prettier/prettier -->
<script setup>
import { ref, onMounted, onUnmounted, computed, nextTick, watch } from 'vue'
import { ref, onMounted, computed, nextTick, watch } from 'vue'
import {
Phone,
VideoCamera,
@@ -112,7 +112,6 @@ const selectedSession = computed(() => {
return messageData.sessionList[selectedSessionId.value]
})
let statusReqTask
onMounted(async () => {
asideWidth.value = settingData.sessionListDrag[userData.user.account] || 300
inputBoxHeight.value = settingData.inputBoxDrag[userData.user.account] || 300
@@ -136,7 +135,7 @@ onMounted(async () => {
}
})
statusReqTask = setInterval(() => {
setInterval(() => {
wsConnect.statusReq(JSON.stringify(accounts))
}, 5000)
@@ -146,10 +145,6 @@ onMounted(async () => {
}
})
onUnmounted(() => {
clearInterval(statusReqTask)
})
const handleMsgListWheel = async () => {
if (msgListDiv.value.scrollTop === 0 && !isLoadMoreLoading.value && !hasNoMoreMsg.value) {
const scrollHeight = msgListDiv.value.scrollHeight