From cea709ad1c7bd45aa45972174bd528b15bf4ae6b Mon Sep 17 00:00:00 2001 From: yxl <584911253@qq.com> Date: 星期五, 07 二月 2025 10:51:51 +0800 Subject: [PATCH] 最新代码提交 --- src/components/Chat/chatList.vue | 32 +++++++++++++++++++++----------- 1 files changed, 21 insertions(+), 11 deletions(-) diff --git a/src/components/Chat/chatList.vue b/src/components/Chat/chatList.vue index caa238e..117f048 100644 --- a/src/components/Chat/chatList.vue +++ b/src/components/Chat/chatList.vue @@ -111,6 +111,12 @@ > </div> </div> + <div v-else-if="res.type == 'stream'"> + <div + v-html="res.val" + class="markdown-container" + ></div> + </div> <div v-else-if="res.type == 'table'"> <table class="contTable"> <thead> @@ -190,7 +196,7 @@ arr: [], components: { VueMarkdown, - affairs + affairs, }, filters: { setWidth(value) { @@ -202,19 +208,19 @@ return "99vh"; } return width; - } + }, }, props: { pageConfig: { type: Object, default: () => ({ - width: "100vw" - }) + width: "100vw", + }), }, list: { type: Array, - default: () => [] - } + default: () => [], + }, }, data() { return { @@ -223,7 +229,7 @@ imgSrc: "", videoSrc: "", audioSrc: "", - isDisabled: true + isDisabled: true, }; }, watch: { @@ -234,7 +240,7 @@ this.load = false; }); } - } + }, }, mounted() { setTimeout(() => { @@ -256,7 +262,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 +380,8 @@ this.videoSrc = undefined; this.audioSrc = undefined; done(); - } - } + }, + }, }; </script> <style scoped> @@ -421,6 +427,10 @@ text-align: center; font-size: 14px; } +.markdown-container { + padding: 10px; + white-space: pre-wrap; +} </style> <style scoped> .webBody { -- Gitblit v1.9.3