From fb403bde8bd10f3992e2be53eadfd645314b4545 Mon Sep 17 00:00:00 2001 From: lqins Date: Sun, 22 Dec 2024 13:55:01 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=9C=E8=89=B2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/ChatReply.vue | 76 ++++++++++++++++++++++++-------- 1 file changed, 58 insertions(+), 18 deletions(-) diff --git a/web/src/components/ChatReply.vue b/web/src/components/ChatReply.vue index d0940101..05c3dd04 100644 --- a/web/src/components/ChatReply.vue +++ b/web/src/components/ChatReply.vue @@ -6,14 +6,23 @@
-
+
{{ dateFormat(data.created_at) }} + {{ dateFormat(data.created_at) }} tokens: {{ data.tokens }} - + @@ -21,13 +30,23 @@ - + - + @@ -56,15 +75,24 @@
-
+
{{ dateFormat(data.created_at) }} + {{ dateFormat(data.created_at) }} - + @@ -72,13 +100,23 @@ - + - + @@ -102,17 +140,17 @@ const props = defineProps({ icon: "", content: "", created_at: "", - tokens: 0, - }, + tokens: 0 + } }, readOnly: { type: Boolean, - default: false, + default: false }, listStyle: { type: String, - default: "list", - }, + default: "list" + } }); const mathjaxPlugin = require("markdown-it-mathjax3"); @@ -122,7 +160,8 @@ const md = require("markdown-it")({ linkify: true, typographer: true, highlight: function (str, lang) { - const codeIndex = parseInt(Date.now()) + Math.floor(Math.random() * 10000000); + const codeIndex = + parseInt(Date.now()) + Math.floor(Math.random() * 10000000); // 显示复制代码按钮 const copyBtn = `复制