Commit f5056cbb authored by nick zheng's avatar nick zheng

fix: markdown格式内容被遮挡

parent 71c28536
...@@ -82,4 +82,25 @@ watchEffect(() => { ...@@ -82,4 +82,25 @@ watchEffect(() => {
word-break: break-all; word-break: break-all;
background-color: unset; background-color: unset;
} }
:deep(pre) {
&::-webkit-scrollbar {
width: 6px;
height: 6px;
}
&::-webkit-scrollbar-corner {
background: transparent;
}
&::-webkit-scrollbar-thumb {
background: #bfbfbf;
border-radius: 5px;
}
&::-webkit-scrollbar-track {
background: transparent;
border-radius: 2px;
}
}
</style> </style>
...@@ -34,7 +34,7 @@ const assistantAvatarUrl = computed(() => { ...@@ -34,7 +34,7 @@ const assistantAvatarUrl = computed(() => {
alt="Avatar" alt="Avatar"
/> />
<div class="ml-[11px]"> <div class="ml-[11px] overflow-auto">
<div class="mb-[7px] line-clamp-1 break-all text-[12px] text-[#999]"> <div class="mb-[7px] line-clamp-1 break-all text-[12px] text-[#999]">
{{ props.messageItem.nickName }} {{ props.messageItem.nickName }}
</div> </div>
......
...@@ -26,7 +26,7 @@ function scrollToBottom() { ...@@ -26,7 +26,7 @@ function scrollToBottom() {
<template> <template>
<div class="flex-1 overflow-hidden overflow-y-auto py-[20px]"> <div class="flex-1 overflow-hidden overflow-y-auto py-[20px]">
<n-scrollbar ref="scrollbarRef" class="min-h-full" content-class="min-h-full flex"> <n-scrollbar ref="scrollbarRef" class="min-h-full" content-class="min-h-full flex">
<div class="flex flex-col-reverse"> <div class="flex flex-col-reverse overflow-hidden">
<div class="pr-[10px]"> <div class="pr-[10px]">
<MessageItem v-for="[key, messageItem] in messageList" :key="key" :message-item="messageItem" /> <MessageItem v-for="[key, messageItem] in messageList" :key="key" :message-item="messageItem" />
</div> </div>
......
...@@ -68,7 +68,7 @@ function handleAudioControl() { ...@@ -68,7 +68,7 @@ function handleAudioControl() {
class="mr-2 mt-1.5 h-8 w-8 flex-shrink-0 rounded-full" class="mr-2 mt-1.5 h-8 w-8 flex-shrink-0 rounded-full"
/> />
<div class="flex flex-col items-start"> <div class="flex flex-col items-start overflow-x-auto">
<div <div
class="min-w-[80px] max-w-full flex-wrap rounded-xl border border-[#e8e9eb] px-4 py-[11px]" class="min-w-[80px] max-w-full flex-wrap rounded-xl border border-[#e8e9eb] px-4 py-[11px]"
:class="role === 'user' ? 'bg-[#4b87ff] text-white' : 'bg-white text-[#333]'" :class="role === 'user' ? 'bg-[#4b87ff] text-white' : 'bg-white text-[#333]'"
......
...@@ -36,7 +36,7 @@ defineExpose({ ...@@ -36,7 +36,7 @@ defineExpose({
</script> </script>
<template> <template>
<main ref="scrollRef" class="h-full overflow-y-auto px-5"> <main ref="scrollRef" class="h-full overflow-y-auto overflow-x-hidden px-5">
<div> <div>
<MessageItem <MessageItem
v-for="[key, messageItem] in messageList" v-for="[key, messageItem] in messageList"
......
...@@ -94,7 +94,10 @@ function handleAudioControl() { ...@@ -94,7 +94,10 @@ function handleAudioControl() {
class="mr-2 mt-1.5 h-8 w-8 flex-shrink-0 rounded-full" class="mr-2 mt-1.5 h-8 w-8 flex-shrink-0 rounded-full"
/> />
<div class="flex w-full flex-col" :class="isMobile && role === 'user' ? 'items-end' : 'items-start'"> <div
class="flex w-full flex-col overflow-x-auto"
:class="isMobile && role === 'user' ? 'items-end' : 'items-start'"
>
<div <div
class="min-w-[80px] flex-wrap rounded-xl border border-[#e8e9eb] px-4 py-[11px]" class="min-w-[80px] flex-wrap rounded-xl border border-[#e8e9eb] px-4 py-[11px]"
:class="[ :class="[
......
...@@ -38,7 +38,7 @@ defineExpose({ ...@@ -38,7 +38,7 @@ defineExpose({
</script> </script>
<template> <template>
<main ref="scrollRef" class="h-full overflow-y-auto px-5"> <main ref="scrollRef" class="h-full overflow-y-auto overflow-x-hidden px-5">
<div> <div>
<MessageItem <MessageItem
v-for="[key, messageItem] in messageList" v-for="[key, messageItem] in messageList"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment