perf: 中断SSE、更换测试环境接口

This commit is contained in:
rd
2025-08-28 14:13:59 +08:00
parent 10fc946eca
commit 6074f716ef
7 changed files with 51 additions and 53 deletions

View File

@ -22,7 +22,7 @@ function isString(str: any): str is string {
* 打字效果Hook
* 当启用打字效果时,返回渐进式显示的内容和打字状态
* 否则直接返回原始内容
*
*
* @param content - 原始内容
* @param typingEnabled - 是否启用打字效果
* @param typingStep - 每次显示的字符数
@ -51,7 +51,7 @@ const useTypedEffect = (
const prevContentValue = unref(prevContent);
// 更新上一次的内容记录
setPrevContent(content.value);
// 如果未启用打字效果且内容为字符串
if (!mergedTypingEnabled.value && isString(content.value)) {
// 若外部触发中止,则保持当前索引,不再自动跳到全文

View File

@ -94,7 +94,7 @@
display: flex;
justify-content: center;
align-items: center;
border-radius: 50px;
border-radius: 16px;
background-color: var(--BG-200, #f2f3f5);
}