Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

chore: 显示原文时使用 .whitespace-pre-wrap #779

Merged
merged 1 commit into from
Mar 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/views/chat/components/Message/Text.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ defineExpose({ textRef })
<div ref="textRef" class="leading-relaxed break-words">
<div v-if="!inversion">
<div v-if="!asRawText" class="markdown-body" v-html="text" />
<div v-else class="raw-text" v-text="text" />
<div v-else class="whitespace-pre-wrap" v-text="text" />
</div>
<div v-else class="whitespace-pre-wrap" v-text="text" />
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/views/chat/components/Message/style.less
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
html.dark {

.message-reply {
.raw-text {
.whitespace-pre-wrap {
white-space: pre-wrap;
color: var(--n-text-color);
}
Expand Down