mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-10 02:07:12 +08:00
41 lines
716 B
Vue
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>
|