Sfoglia il codice sorgente

style: system message中milestone update的消息卡片新增插入时间展示

zhouyuhao 6 mesi fa
parent
commit
3129f8ceee

+ 4 - 1
src/components/NotificationMessageCard/src/NotificationMessageCard.vue

@@ -16,6 +16,7 @@ const props = withDefaults(
     isScrollPadding?: boolean // 是否有padding
     updateReadCardsOnChange?: boolean // 是否在数据变化时请求接口更新已读卡片
     topOffset?: number // 应减去高度
+    isShowInsertionTime?: boolean // 是否显示插入时间
   }>(),
   {
     isObserver: true,
@@ -229,7 +230,9 @@ const scrollParentBoxStyle = computed(() => {
             :data="item.info"
           />
           <slot></slot>
-          <div class="insertion-time">{{ formatTimezone(item.info.first_notifiation_date) }}</div>
+          <div class="insertion-time" v-if="isShowInsertionTime">
+            {{ formatTimezone(item.info.first_notifiation_date) }}
+          </div>
         </div>
       </DynamicScrollerItem>
     </template>

+ 3 - 0
src/views/SystemMessage/src/SystemMessage.vue

@@ -176,6 +176,7 @@ onMounted(() => {
                 :data="notificationList"
                 @hasCardRead="changeCardRead"
                 :isScrollPadding="true"
+                :isShowInsertionTime="true"
                 :updateReadCardsOnChange="false"
               ></NotificationMessageCard>
             </div>
@@ -196,6 +197,7 @@ onMounted(() => {
                 v-if="activeTabName === 'Unread'"
                 :data="unreadNotificationList"
                 :isScrollPadding="true"
+                :isShowInsertionTime="true"
                 :updateReadCardsOnChange="false"
               ></NotificationMessageCard>
             </div>
@@ -207,6 +209,7 @@ onMounted(() => {
                 v-if="activeTabName === 'Read'"
                 :updateReadCardsOnChange="false"
                 :isScrollPadding="true"
+                :isShowInsertionTime="true"
                 :data="readNotificationList"
               >
               </NotificationMessageCard>