✨ Basic chat layouts
This commit is contained in:
21
src/components/chat/ChatList.vue
Normal file
21
src/components/chat/ChatList.vue
Normal file
@@ -0,0 +1,21 @@
|
||||
<template>
|
||||
<v-infinite-scroll
|
||||
side="start"
|
||||
class="mt-[-16px]"
|
||||
@load="props.loader"
|
||||
>
|
||||
<template v-for="item in props.messages" :key="item">
|
||||
<chat-message class="mb-4" :item="item" />
|
||||
</template>
|
||||
|
||||
<template #empty>
|
||||
<div class="flex-grow-1"></div>
|
||||
</template>
|
||||
</v-infinite-scroll>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import ChatMessage from "@/components/chat/ChatMessage.vue"
|
||||
|
||||
const props = defineProps<{ loader: any, messages: any[] }>()
|
||||
</script>
|
Reference in New Issue
Block a user