Просмотр исходного кода

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

zhouyuhao 10 месяцев назад
Родитель
Сommit
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 = () => {
 const watchCards = () => {
   curPageAllCards.value = document?.querySelectorAll('.notification-message-card')
   curPageAllCards.value = document?.querySelectorAll('.notification-message-card')
   curPageAllCards.value.forEach((card: any) => {
   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])
       notificationMsgStore.concatNotificationMsgList([card.dataset.cardId])
 
 
       observer.observe(card)
       observer.observe(card)