From 3dc17dbcb1fb1d64c469deed1518d1817846b452 Mon Sep 17 00:00:00 2001 From: yxl <584911253@qq.com> Date: 星期三, 19 二月 2025 09:49:50 +0800 Subject: [PATCH] commit --- src/components/Chat/chatList.vue | 48 ++++++++++++++++++++++++++++++++++++------------ 1 files changed, 36 insertions(+), 12 deletions(-) diff --git a/src/components/Chat/chatList.vue b/src/components/Chat/chatList.vue index ef29cd0..5a815ca 100644 --- a/src/components/Chat/chatList.vue +++ b/src/components/Chat/chatList.vue @@ -111,6 +111,18 @@ > </div> </div> + <div v-else-if="res.type == 'stream'"> + <div + v-if="res.thinkMsg" + v-html="res.val" + class="think-markdown" + ></div> + <div + v-else + v-html="res.val" + class="markdown-container" + ></div> + </div> <div v-else-if="res.type == 'table'"> <table class="contTable"> <thead> @@ -190,7 +202,7 @@ arr: [], components: { VueMarkdown, - affairs + affairs, }, filters: { setWidth(value) { @@ -202,19 +214,19 @@ return "99vh"; } return width; - } + }, }, props: { pageConfig: { type: Object, default: () => ({ - width: "100vw" - }) + width: "100vw", + }), }, list: { type: Array, - default: () => [] - } + default: () => [], + }, }, data() { return { @@ -223,7 +235,7 @@ imgSrc: "", videoSrc: "", audioSrc: "", - isDisabled: true + isDisabled: true, }; }, watch: { @@ -234,7 +246,7 @@ this.load = false; }); } - } + }, }, mounted() { setTimeout(() => { @@ -256,7 +268,7 @@ setDownLoadFile(res) { // 浣跨敤marked灏哅arkdown杞崲涓篐TML const blob = new Blob([res.val], { - type: "text/markdown" + type: "text/markdown", }); // 浣跨敤HTML5鐨凚lob鐢熸垚閾炬帴锛岃鐢ㄦ埛鍙互涓嬭浇鐢熸垚鐨刉ord鏂囨。 const link = URL.createObjectURL(blob); @@ -374,8 +386,8 @@ this.videoSrc = undefined; this.audioSrc = undefined; done(); - } - } + }, + }, }; </script> <style scoped> @@ -420,6 +432,18 @@ padding: 10px; text-align: center; font-size: 14px; +} +.markdown-container { + padding: 10px; + white-space: pre-wrap; + color: #fff; + font-size: 16px; +} +.think-markdown { + font-size: 13px; + color: #ccc; + border-left: 1px solid #ccc; + padding-left: 5px; } </style> <style scoped> @@ -784,7 +808,7 @@ .newConcentLeft table { border: 1px solid white; - text-align: center; + text-align: left; line-height: 30px; font-family: "Arial", sans-serif; font-size: 16px; -- Gitblit v1.9.3