소스 검색

feat: 实现多个地方展示消息时仍能正确置为已读

zhouyuhao 8 달 전
부모
커밋
62e3a87cf5
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      src/components/NotificationMessageCard/src/NotificationMessageCard.vue

+ 3 - 3
src/components/NotificationMessageCard/src/NotificationMessageCard.vue

@@ -55,9 +55,9 @@ const curPageAllCards = ref<any>([])
 const watchCards = () => {
   curPageAllCards.value = document?.querySelectorAll('.notification-message-card')
   curPageAllCards.value.forEach((card: any) => {
-    const index = notificationMsgStore.notificationMsgList.indexOf(card.dataset.cardId)
-
-    if (index < 0 && card.dataset.cardIsread === 'false' && card.dataset.cardId) {
+    // const index = notificationMsgStore.notificationMsgList.indexOf(card.dataset.cardId)
+    // index < 0 &&
+    if (card.dataset.cardIsread === 'false' && card.dataset.cardId) {
       notificationMsgStore.concatNotificationMsgList([card.dataset.cardId])
 
       observer.observe(card)