Jelajahi Sumber

优化消息通知徽标更新的性能

yusheng 10 bulan lalu
induk
melakukan
dcb43e9372
1 mengubah file dengan 5 tambahan dan 1 penghapusan
  1. 5 1
      src/layout/components/header-notice.vue

+ 5 - 1
src/layout/components/header-notice.vue

@@ -203,7 +203,11 @@
       }
       }
     },
     },
     watch: {
     watch: {
-      noticeCount() {
+      noticeCount(n, o) {
+        if (n == o) {
+          return;
+        }
+        console.log(1);
         this.$store.dispatch('user/setMenuBadge', {
         this.$store.dispatch('user/setMenuBadge', {
           path: '/page-wt/message',
           path: '/page-wt/message',
           value: this.noticeCount,
           value: this.noticeCount,