Skip to content

新增"单词笔记"功能,并使关闭“自动切换下一个单词”后的空格冷却时间可自定义#267

Open
LofterZigma wants to merge 0 commit into
zyronon:masterfrom
LofterZigma:master
Open

新增"单词笔记"功能,并使关闭“自动切换下一个单词”后的空格冷却时间可自定义#267
LofterZigma wants to merge 0 commit into
zyronon:masterfrom
LofterZigma:master

Conversation

@LofterZigma
Copy link
Copy Markdown

概述

新增了单词笔记功能,并优化了关闭“自动切换下一个单词”后的空格跳转体验。用户现在可以在打字页为单词编辑笔记,如果存在笔记,其会展示在例句、短语、近义词区域顶部;同时在手动跳转模式下,空格键的冷却时间可以配置,以适配个人习惯。

方案

  • Word 数据结构中新增 note 字段,并补齐默认值与导入转换逻辑。
  • 在词典编辑页中支持笔记字段的编辑、Excel 导入和导出。
  • 在单词打字页新增“编辑笔记”按钮,支持进入/退出编辑态。
  • 编辑笔记时禁用单词打字栏的键盘接收,避免笔记输入被误当作单词输入。
  • 笔记编辑框聚焦时隐藏单词打字光标,切换单词时自动退出编辑态。
  • 将“自动切换下一个单词时间”在关闭自动切换后复用为“空格冷却时间”,并使用该值控制手动空格跳转的冷却窗口。
  • 将调整时间的幅度从100ms改为50ms,便于精细调整。

设计文件

主要涉及文件:

  • packages/core/src/types/types.ts
  • packages/core/src/types/func.ts
  • packages/core/src/utils/index.ts
  • packages/core/src/components/word/TypeWord.vue
  • packages/core/src/components/setting/WordSetting.vue
  • packages/core/src/hooks/event.ts
  • apps/nuxt/app/pages/(words)/dict.vue
  • apps/vscode-web/src/pages/(words)/dict.vue

测试

  • 记录笔记后可正常显示
  • 笔记可正常导入/导出
  • 自定义的空格冷却时间工作正常

@vercel
Copy link
Copy Markdown

vercel Bot commented May 17, 2026

@LofterZigma is attempting to deploy a commit to the zyronon's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
type-words-core Ready Ready Preview, Comment May 17, 2026 4:29pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant