From 9008664606483e2902f03929f0f696ac43de6db4 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 1 Aug 2020 10:02:03 +0900 Subject: [PATCH] fix(client): Cannot read announcement Fix #6609 --- src/client/pages/announcements.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/client/pages/announcements.vue b/src/client/pages/announcements.vue index 089475ed6..49841db8a 100644 --- a/src/client/pages/announcements.vue +++ b/src/client/pages/announcements.vue @@ -11,7 +11,7 @@ @@ -47,8 +47,13 @@ export default Vue.extend({ }, methods: { - read(announcement) { - announcement.isRead = true; + // TODO: これは実質的に親コンポーネントから子コンポーネントのプロパティを変更してるのでなんとかしたい + read(items, announcement, i) { + console.log(this); + Vue.set(items, i, { + ...announcement, + isRead: true, + }); this.$root.api('i/read-announcement', { announcementId: announcement.id }); }, }