From 985aa40f5a3d15d4f196297697430d877b473e04 Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期一, 06 一月 2025 13:53:48 +0800 Subject: [PATCH] 时间输入 --- src/components/chat/Chat.vue | 64 ++++++++++++------------------- 1 files changed, 25 insertions(+), 39 deletions(-) diff --git a/src/components/chat/Chat.vue b/src/components/chat/Chat.vue index 1f15143..fe35bdb 100644 --- a/src/components/chat/Chat.vue +++ b/src/components/chat/Chat.vue @@ -340,14 +340,29 @@ chunkRes.value = '鍒嗘瀽缁撴潫'; } } + const getLastGroup = () => { + const lastGroup = computedMessageList.value.at(-1).stepGroup.at(-1); + return lastGroup; + } + const getLastStepList = () => { + const stepList = getLastGroup()?.value ?? []; + return stepList; + }; + const getLastStepItem = () => { + const stepList = getLastStepList(); + const lastStepItem = stepList.at(-1); + return lastStepItem; + }; + + const checkStepItem = (stepItem) => { + if (!stepItem.subStep) { + stepItem.subStep = []; + } + }; if (chunkRes.mode === 'question') { - const lastGroup = computedMessageList.value.at(-1).stepGroup.at(-1); - const stepList = lastGroup?.value ?? []; - const lastStepItem = stepList.at(-1); - if (!lastStepItem.subStep) { - lastStepItem.subStep = []; - } + const lastStepItem = getLastStepItem(); + checkStepItem(lastStepItem); lastStepItem.subStep.push({ type: chunkRes.value.type, data: chunkRes.value, @@ -355,6 +370,9 @@ scrollToBottom(); return; } + + + // 鏆傛椂涓嶈�冭檻澶氫釜 report鎯呭喌 // if (lastIsResult && chunkRes.mode !== 'finish') { @@ -640,37 +658,5 @@ </script> <style scoped lang="scss"> -pre { - font-family: -apple-system, 'Noto Sans', 'Helvetica Neue', Helvetica, 'Nimbus Sans L', Arial, 'Liberation Sans', 'PingFang SC', - 'Hiragino Sans GB', 'Noto Sans CJK SC', 'Source Han Sans SC', 'Source Han Sans CN', 'Microsoft YaHei', 'Wenquanyi Micro Hei', - 'WenQuanYi Zen Hei', 'ST Heiti', SimHei, 'WenQuanYi Zen Hei Sharp', sans-serif; -} - -.more-loading { - :deep(.el-loading-spinner) { - --loading-size: 35px; - margin-top: 0; - .circular { - width: var(--loading-size); - height: var(--loading-size); - } - } -} - -:deep(.el-step__icon.is-text) { - --radius-size: 24px; - width: var(--radius-size); - height: var((--radius-size)); -} - -:deep(.el-step__icon-inner) { - font-size: 16px !important; -} -:deep(.el-step__description) { - min-height: 20px; -} - -:deep(.el-step:last-of-type .el-step__description) { - // display: none; -} +@import './index.scss'; </style> -- Gitblit v1.9.3