From 0b81d678820a010791dbd843860bcd1808252a2d Mon Sep 17 00:00:00 2001 From: twolate0101 <170792018+twolate0101@users.noreply.github.com> Date: Wed, 10 Dec 2025 10:39:39 +0800 Subject: [PATCH 1/4] Feat: Auto-scroll editor to cursor when content changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增功能:编辑器自动滚动跟随 1.修改了 CodePage.vue 文件,移除了父容器的 overflow-auto 样式 2.配置了 CodeMirror 的 updateListener, 监听文档变化 3.当光标位置变化时, 使用 scrollIntoView 将视图滚动到底部, 优化输入体验 --- web/src/pages/CodePage.vue | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/web/src/pages/CodePage.vue b/web/src/pages/CodePage.vue index c8fe9d5..e4ffb31 100644 --- a/web/src/pages/CodePage.vue +++ b/web/src/pages/CodePage.vue @@ -1,7 +1,7 @@