From fc17e7663a5cf8d6f76e439ca83cea83bcc6de1c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=99=88=E6=9D=B0?= <17793426456@163.com>
Date: Wed, 9 Sep 2026 15:57:43 +0800
Subject: [PATCH 09/18] =?UTF-8?q?fix(word-practice):=20=E4=BA=BA=E5=B7=A5?=
=?UTF-8?q?=E5=B8=A6=E8=AF=BB=E6=94=AF=E6=8C=81=E6=95=B4=E5=BC=A0=E5=8D=95?=
=?UTF-8?q?=E8=AF=8D=E5=8D=A1=E9=80=89=E4=B8=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
人工带读时点击整张单词卡即可标记当前朗读单词,
并阻止单词卡内的翻页和笔记操作误触发朗读标记。
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
---
web/src/pages/WordPractice.tsx | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git a/web/src/pages/WordPractice.tsx b/web/src/pages/WordPractice.tsx
index f7de99d..12991e4 100644
--- a/web/src/pages/WordPractice.tsx
+++ b/web/src/pages/WordPractice.tsx
@@ -343,7 +343,8 @@ export default function WordPractice() {
words.findIndex((w) => w.id === cardWord.id) === selectedIndex
? "border-primary bg-primary-soft"
: "border-border"
- }`}
+ } ${manualReadMode ? "cursor-pointer" : ""}`}
+ onClick={manualReadMode ? () => handleWordTap(cardWord) : undefined}
style={{ minHeight: "min(62vh, calc(100dvh - 13.5rem))" }}
>
@@ -355,7 +356,10 @@ export default function WordPractice() {
variant="ghost"
size="iconRound"
disabled={cardIndex <= 0}
- onClick={() => setCardIndex((i) => Math.max(0, i - 1))}
+ onClick={(event) => {
+ event.stopPropagation();
+ setCardIndex((i) => Math.max(0, i - 1));
+ }}
className="absolute left-2 top-1/2 z-10 size-11 -translate-y-1/2 bg-muted/90 shadow-sm disabled:opacity-35"
>
@@ -363,7 +367,10 @@ export default function WordPractice() {