From 278a64e02f22d46ec5652d1c3e0906a23daf120c Mon Sep 17 00:00:00 2001 From: Mila <Mila@pollex.com.tw> Date: 星期一, 24 一月 2022 09:44:46 +0800 Subject: [PATCH] update: TODO#134657 排序通知清單 --- PAMapp/store/index.ts | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/PAMapp/store/index.ts b/PAMapp/store/index.ts index 9abd165..3fe527f 100644 --- a/PAMapp/store/index.ts +++ b/PAMapp/store/index.ts @@ -150,7 +150,9 @@ @Action storeMyPersonalNotification() { reviewsService.getMyPersonalNotification().then(data => { - this.context.commit('updateNotification', data); + const sortData = data + .sort((preItem, nextItem) => +new Date(nextItem.createdDate) - +new Date(preItem.createdDate)) + this.context.commit('updateNotification', sortData); }) } -- Gitblit v1.8.0