feat: 增强连线题功能,添加错误反馈机制
- 在 MatchQuizPanel 组件中引入错误连线对的状态管理,提供红色高亮和抖动反馈。 - 更新匹配逻辑,确保用户在连线错误时能及时获得反馈信息。 - 修改类型定义,支持自定义错误提示信息的函数形式,提升灵活性。 - 优化用户体验,确保在错误状态下的匹配项能正确展示。
This commit is contained in:
1 parent
b91f2430c6
commit
5d00adc1a5
43 files changed
+1662
-54
No files matched your search
+10
-2
@@ -6,7 +6,14 @@ import Menu from "@/pages/Menu";
|
||||
import Entrance from "@/pages/entrance";
|
||||
|
||||
//各个故居路由
|
||||
import { ChenyunRoutes, MaozedongRoutes, SunzhongshanRoutes, HuangyanpeiRoutes, LuxunRoutes } from "./modules";
|
||||
import {
|
||||
ChenyunRoutes,
|
||||
MaozedongRoutes,
|
||||
SunzhongshanRoutes,
|
||||
HuangyanpeiRoutes,
|
||||
LuxunRoutes,
|
||||
ZhanglepingRoutes,
|
||||
} from "./modules";
|
||||
|
||||
const baseRoutes: RouteObject[] = [
|
||||
{
|
||||
@@ -23,7 +30,7 @@ const baseRoutes: RouteObject[] = [
|
||||
* 每个类型下有2个故居
|
||||
* 革命先驱:毛泽东、孙中山
|
||||
* 文化名人:鲁迅、黄炎培
|
||||
* 艺术名家:聂耳、刘海栗
|
||||
* 艺术名家:聂耳、张乐平
|
||||
* 经济巨擘:荣德生、陈云
|
||||
*/
|
||||
{
|
||||
@@ -49,6 +56,7 @@ const router = createHashRouter([
|
||||
...SunzhongshanRoutes,
|
||||
...HuangyanpeiRoutes,
|
||||
...LuxunRoutes,
|
||||
...ZhanglepingRoutes,
|
||||
{
|
||||
path: "*",
|
||||
element: <NotFound />,
|
||||
|
||||
@@ -3,3 +3,4 @@ export * from "./maozedong";
|
||||
export * from "./sunzhongshan";
|
||||
export * from "./huangyanpei";
|
||||
export * from "./luxun";
|
||||
export * from "./zhangleping";
|
||||
@@ -0,0 +1,62 @@
|
||||
import { lazy } from "react";
|
||||
import { RouteObject } from "react-router-dom";
|
||||
import { ResidenceLayout } from "@/components/layout";
|
||||
|
||||
const HomePage = lazy(() => import("@/pages/zhangleping/home"));
|
||||
const ZhanglepingPlace1 = lazy(
|
||||
() => import("@/pages/zhangleping/place/place1")
|
||||
);
|
||||
const ZhanglepingPlace2 = lazy(
|
||||
() => import("@/pages/zhangleping/place/place2")
|
||||
);
|
||||
const ZhanglepingPlace3 = lazy(
|
||||
() => import("@/pages/zhangleping/place/place3")
|
||||
);
|
||||
const ZhanglepingPlace4 = lazy(
|
||||
() => import("@/pages/zhangleping/place/place4")
|
||||
);
|
||||
const ZhanglepingPlace5 = lazy(
|
||||
() => import("@/pages/zhangleping/place/place5")
|
||||
);
|
||||
|
||||
// 张乐平 router
|
||||
// 路径格式:/:moduleName/zhangleping/:page
|
||||
export const ZhanglepingRoutes: RouteObject[] = [
|
||||
{
|
||||
path: "/:moduleName/zhangleping",
|
||||
element: <ResidenceLayout />,
|
||||
children: [
|
||||
{
|
||||
index: true,
|
||||
element: <HomePage />,
|
||||
},
|
||||
{
|
||||
path: "home",
|
||||
element: <HomePage />,
|
||||
},
|
||||
// 对话模块
|
||||
{
|
||||
path: "place1",
|
||||
element: <ZhanglepingPlace1 />,
|
||||
},
|
||||
{
|
||||
path: "place2",
|
||||
element: <ZhanglepingPlace2 />,
|
||||
},
|
||||
{
|
||||
path: "place3",
|
||||
element: <ZhanglepingPlace3 />,
|
||||
},
|
||||
{
|
||||
path: "place4",
|
||||
element: <ZhanglepingPlace4 />,
|
||||
},
|
||||
{
|
||||
path: "place5",
|
||||
element: <ZhanglepingPlace5 />,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
Reference in new issue
Block a user