Files
SQLBot/frontend/src/views/chat/ChatBlock.vue
T
2025-06-12 14:54:30 +08:00

41 lines
716 B
Vue

<script setup lang="ts">
import type { ChatMessage } from '@/api/chat.ts'
defineProps<{
msg?: ChatMessage
}>()
</script>
<template>
<div class="chat-block-outer">
<div class="chat-block">
<slot>
<div class="chat-block-content">
<div v-dompurify-html="msg?.content"></div>
</div>
</slot>
</div>
<div class="chat-block-footer">
<slot name="footer"></slot>
</div>
</div>
</template>
<style scoped lang="less">
.chat-block-outer {
.chat-block {
border-radius: 2px;
background-color: white;
word-wrap: break-word;
white-space: pre-wrap;
.chat-block-content {
padding: 12px;
}
}
.chat-block-footer {
}
}
</style>