变量名优化

This commit is contained in:
bob
2024-11-28 16:39:30 +08:00
parent ef42551c40
commit cc93d3ecac

View File

@@ -678,8 +678,8 @@ const onOpenSession = async ({ msgType, objectInfo }) => {
*/
watch(
() => msgRecords.value,
(oldValue) => {
if (!oldValue || selectedSession.value.unreadCount === 0) return
(newValue) => {
if (!newValue || selectedSession.value.unreadCount === 0) return
nextTick(() => {
const unreadMsgEls = document.querySelectorAll('.unreadMsg')
if (unreadMsgEls.length === 0) return