src/page/user/notify.vue
@@ -16,7 +16,7 @@ <div> <div class="box page-part transaction"> <div class="box-contain clearfix"> <notifyList></notifyList> <notifyList @messageRead="handleMessageRead"></notifyList> </div> </div> </div> @@ -43,6 +43,15 @@ methods: { toSure () { // 确定 }, handleMessageRead() { // 消息已读,通知App组件更新未读数量 if (this.$root && this.$root.$children && this.$root.$children[0]) { const appComponent = this.$root.$children[0] if (appComponent.getUnreadCount) { appComponent.getUnreadCount() } } } } }