From 56a7a274d9422567ea7a88eb0db61940e38f6b94 Mon Sep 17 00:00:00 2001 From: Zhang Jing Xuan <17660634225@163.com> Date: Thu, 30 Jul 2026 15:07:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=89=A9=E5=B1=95=E5=8A=A8=E7=94=BB?= =?UTF-8?q?=E5=AD=A6=E7=A7=91=E7=B1=BB=E5=9E=8B=E3=80=81=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?Ctrl+K=E6=90=9C=E7=B4=A2=E5=BF=AB=E6=8D=B7=E9=94=AE=E3=80=81?= =?UTF-8?q?=E6=97=A0=E9=9A=9C=E7=A2=8D=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 前端动画类型选择扩展至12个学科(数学/物理/化学/生物/地理/语文/英语/历史/政治/美术/音乐/通用) - 后端schema验证同步更新支持所有新学科类型 - 扩展inferAnimationType自动推断函数支持更多学科关键词 - 添加Ctrl+K键盘快捷键聚焦全局搜索框 - 搜索框添加键盘快捷键提示徽章 - 添加focus-visible焦点样式和prefers-reduced-motion动画减弱 - 添加text-ellipsis/clamp-2/clamp-3工具类 - 添加smooth scroll平滑滚动 --- backend/schemas/animation.py | 2 +- frontend/src/components/layout/AppHeader.vue | 33 ++++++++++++- frontend/src/styles/global.css | 51 ++++++++++++++++++++ frontend/src/views/Animation.vue | 25 ++++++++-- 4 files changed, 105 insertions(+), 6 deletions(-) diff --git a/backend/schemas/animation.py b/backend/schemas/animation.py index d39818f..43f6caf 100644 --- a/backend/schemas/animation.py +++ b/backend/schemas/animation.py @@ -5,7 +5,7 @@ from typing import Optional, Any class AnimationGenerate(BaseModel): prompt: str = Field(..., min_length=1, description="教学动画描述") - anim_type: str = Field(default="general", pattern=r"^(math|physics|chemistry|biology|geography|general)$") + anim_type: str = Field(default="general", pattern=r"^(math|physics|chemistry|biology|geography|chinese|english|history|politics|art|music|general)$") subject: str = Field(default="", max_length=50) diff --git a/frontend/src/components/layout/AppHeader.vue b/frontend/src/components/layout/AppHeader.vue index 7a98288..223163f 100644 --- a/frontend/src/components/layout/AppHeader.vue +++ b/frontend/src/components/layout/AppHeader.vue @@ -15,7 +15,8 @@
@@ -78,7 +79,7 @@