render <br> tag for ChatPlus page

This commit is contained in:
RockYang 2023-04-21 14:20:04 +08:00
parent 52398d9b8d
commit 54dccbef4c
3 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
<template>
<div class="chat-line chat-line-right">
<div class="chat-item">
<div class="content">{{ content }}</div>
<div class="content" v-html="content"></div>
<div class="triangle"></div>
</div>

View File

@ -128,7 +128,7 @@
import {defineComponent, nextTick} from 'vue'
import ChatPrompt from "@/components/ChatPrompt.vue";
import ChatReply from "@/components/ChatReply.vue";
import {isMobile, randString} from "@/utils/libs";
import {isMobile, randString, renderInputText} from "@/utils/libs";
import {ElMessage, ElMessageBox} from 'element-plus'
import {Tools, Lock, Delete, VideoPause, RefreshRight} from '@element-plus/icons-vue'
import ConfigDialog from '@/components/ConfigDialog.vue'
@ -401,7 +401,7 @@ export default defineComponent({
type: "prompt",
id: randString(32),
icon: 'images/avatar/user.png',
content: this.inputValue
content: renderInputText(this.inputValue)
});
this.sending = true;

View File

@ -175,7 +175,7 @@
import {defineComponent, nextTick} from 'vue'
import ChatPrompt from "@/components/plus/ChatPrompt.vue";
import ChatReply from "@/components/plus/ChatReply.vue";
import {isMobile, randString} from "@/utils/libs";
import {isMobile, randString, renderInputText} from "@/utils/libs";
import {ElMessage, ElMessageBox} from 'element-plus'
import {
Tools,
@ -486,7 +486,7 @@ export default defineComponent({
type: "prompt",
id: randString(32),
icon: 'images/avatar/user.png',
content: this.inputValue
content: renderInputText(this.inputValue)
});
this.sending = true;