Преглед изворни кода

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

yusheng пре 10 месеци
родитељ
комит
dcb43e9372
1 измењених фајлова са 5 додато и 1 уклоњено
  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,