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

显示 ChatGPT 输出的原文时保留空格和换行
main
Yi 2 years ago committed by GitHub
parent 9c6a3d6110
commit 92278932ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -72,7 +72,7 @@ defineExpose({ textRef })
<div ref="textRef" class="leading-relaxed break-words"> <div ref="textRef" class="leading-relaxed break-words">
<div v-if="!inversion"> <div v-if="!inversion">
<div v-if="!asRawText" class="markdown-body" v-html="text" /> <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>
<div v-else class="whitespace-pre-wrap" v-text="text" /> <div v-else class="whitespace-pre-wrap" v-text="text" />
</div> </div>

@ -62,7 +62,7 @@
html.dark { html.dark {
.message-reply { .message-reply {
.raw-text { .whitespace-pre-wrap {
white-space: pre-wrap; white-space: pre-wrap;
color: var(--n-text-color); color: var(--n-text-color);
} }

Loading…
Cancel
Save