|
@@ -6,6 +6,7 @@ import { useNotificationMessage } from '@/stores/modules/notificationMessage'
|
|
|
import { cloneDeep } from 'lodash'
|
|
import { cloneDeep } from 'lodash'
|
|
|
import { DynamicScroller, DynamicScrollerItem } from 'vue3-virtual-scroller'
|
|
import { DynamicScroller, DynamicScrollerItem } from 'vue3-virtual-scroller'
|
|
|
import 'vue3-virtual-scroller/dist/vue3-virtual-scroller.css'
|
|
import 'vue3-virtual-scroller/dist/vue3-virtual-scroller.css'
|
|
|
|
|
+import { formatTimezone } from '@/utils/tools'
|
|
|
|
|
|
|
|
const notificationMsgStore = useNotificationMessage()
|
|
const notificationMsgStore = useNotificationMessage()
|
|
|
const props = withDefaults(
|
|
const props = withDefaults(
|
|
@@ -15,6 +16,7 @@ const props = withDefaults(
|
|
|
isScrollPadding?: boolean // 是否有padding
|
|
isScrollPadding?: boolean // 是否有padding
|
|
|
updateReadCardsOnChange?: boolean // 是否在数据变化时请求接口更新已读卡片
|
|
updateReadCardsOnChange?: boolean // 是否在数据变化时请求接口更新已读卡片
|
|
|
topOffset?: number // 应减去高度
|
|
topOffset?: number // 应减去高度
|
|
|
|
|
+ isShowInsertionTime?: boolean // 是否显示插入时间
|
|
|
}>(),
|
|
}>(),
|
|
|
{
|
|
{
|
|
|
isObserver: true,
|
|
isObserver: true,
|
|
@@ -228,6 +230,9 @@ const scrollParentBoxStyle = computed(() => {
|
|
|
:data="item.info"
|
|
:data="item.info"
|
|
|
/>
|
|
/>
|
|
|
<slot></slot>
|
|
<slot></slot>
|
|
|
|
|
+ <div class="insertion-time" v-if="isShowInsertionTime">
|
|
|
|
|
+ {{ formatTimezone(item.info.first_notifiation_date) }}
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</DynamicScrollerItem>
|
|
</DynamicScrollerItem>
|
|
|
</template>
|
|
</template>
|
|
@@ -242,4 +247,14 @@ const scrollParentBoxStyle = computed(() => {
|
|
|
padding: 0px 140px 0px 16px;
|
|
padding: 0px 140px 0px 16px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+.notification-message-card {
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ .insertion-time {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ right: 0;
|
|
|
|
|
+ top: 4px;
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ color: var(--color-neutral-2);
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|