Chat message send and read history

This commit is contained in:
2024-03-30 23:21:22 +08:00
parent 8bb9816cd0
commit a5efec89f2
7 changed files with 137 additions and 40 deletions

View File

@@ -1,8 +1,7 @@
<template>
<v-infinite-scroll
side="start"
class="mt-[-16px]"
@load="props.loader"
class="mt-[-16px] overflow-hidden"
:onLoad="props.loader"
>
<template v-for="item in props.messages" :key="item">
<chat-message class="mb-4" :item="item" />
@@ -17,5 +16,5 @@
<script setup lang="ts">
import ChatMessage from "@/components/chat/ChatMessage.vue"
const props = defineProps<{ loader: any, messages: any[] }>()
const props = defineProps<{ loader: (opts: any) => Promise<any>, messages: any[] }>()
</script>