Optimize the layout of message content.

This commit is contained in:
Rafi
2023-04-02 15:10:22 +08:00
parent 8ff914582a
commit 70efc09dae
2 changed files with 6 additions and 13 deletions

View File

@@ -64,18 +64,16 @@ onUpdated(() => {
rounded="lg" rounded="lg"
elevation="2" elevation="2"
> >
<v-card-text> <div
<div ref="contentElm"
ref="contentElm" v-html="contentHtml"
v-html="contentHtml" class="chat-msg-content pa-3"
class="chat-msg-content" ></div>
></div>
</v-card-text>
</v-card> </v-card>
</template> </template>
<style> <style>
.chat-msg-content ol { .chat-msg-content ol, .chat-msg-content ul {
padding-left: 2em; padding-left: 2em;
} }
.hljs-code-container { .hljs-code-container {

View File

@@ -12,7 +12,6 @@ const loadConversation = async () => {
const { data, error } = await useAuthFetch('/api/chat/conversations/' + route.params.id) const { data, error } = await useAuthFetch('/api/chat/conversations/' + route.params.id)
if (!error.value) { if (!error.value) {
conversation.value = Object.assign(conversation.value, data.value) conversation.value = Object.assign(conversation.value, data.value)
console.log(conversation.value)
} }
} }
@@ -24,7 +23,6 @@ const loadMessage = async () => {
} }
onActivated(async () => { onActivated(async () => {
console.log('activated')
if (route.params.id) { if (route.params.id) {
conversation.value.loadingMessages = true conversation.value.loadingMessages = true
await loadConversation() await loadConversation()
@@ -36,9 +34,6 @@ onActivated(async () => {
currentConversation.value = Object.assign({}, conversation.value) currentConversation.value = Object.assign({}, conversation.value)
}) })
watchEffect(() => {
console.log('conversation.value', conversation.value)
})
</script> </script>
<template> <template>