feat: 增强连线题功能,添加错误反馈机制
- 在 MatchQuizPanel 组件中引入错误连线对的状态管理,提供红色高亮和抖动反馈。 - 更新匹配逻辑,确保用户在连线错误时能及时获得反馈信息。 - 修改类型定义,支持自定义错误提示信息的函数形式,提升灵活性。 - 优化用户体验,确保在错误状态下的匹配项能正确展示。
This commit is contained in:
1 parent
b91f2430c6
commit
5d00adc1a5
43 files changed
+1662
-54
No files matched your search
@@ -284,7 +284,7 @@ const DragFill = forwardRef<HTMLDivElement, DragFillProps>(
|
||||
|
||||
// 处理鼠标按下开始拖拽
|
||||
const handleMouseDown = (e: React.MouseEvent, optionValue: string) => {
|
||||
startDragging(optionValue, e.clientX, e.clientY, e.currentTarget);
|
||||
startDragging(optionValue, e.clientX, e.clientY, e.currentTarget as HTMLElement);
|
||||
};
|
||||
|
||||
// 处理触摸开始拖拽
|
||||
@@ -293,7 +293,7 @@ const DragFill = forwardRef<HTMLDivElement, DragFillProps>(
|
||||
if (!touch) return;
|
||||
// 防止滚动干扰
|
||||
e.preventDefault();
|
||||
startDragging(optionValue, touch.clientX, touch.clientY, e.currentTarget);
|
||||
startDragging(optionValue, touch.clientX, touch.clientY, e.currentTarget as HTMLElement);
|
||||
};
|
||||
|
||||
// 移除填充
|
||||
|
||||
Reference in new issue
Block a user