Browse Source

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

yusheng 11 tháng trước cách đây
mục cha
commit
dcb43e9372
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      src/layout/components/header-notice.vue

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

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