feat: 更新配置和组件,添加引导对话

- 更新 ESLint 配置以忽略 vite.config.ts 文件。
- 在 package.json 中添加 pnpm 配置。
- 修改 tsconfig 文件以包含 vite.config.ts 和 eslint.config.ts。
- 在多个场景中添加引导对话,增强用户学习体验。
- 更新组件中的文本和描述,确保一致性和准确性。
This commit is contained in:
zhongyidian committed 2026-01-12 18:05:42 +08:00
1 parent 046501705f
commit d226283e15
24 files changed
+186 -93

No files matched your search

+23 -18
View File
@@ -9,7 +9,7 @@ import {
GuideStepsItem,
type SingleChoiceOption,
type DragFillResult,
QuizPanel,
SingleChoiceQuizPanel,
StudyGuideModal,
} from "@/components";
import { SuccessAlert, DragQuizPanel } from "@/components/layout";
@@ -89,6 +89,7 @@ const ChenyunPlace7 = () => {
const [quiz2Value, setQuiz2Value] = useState<DragFillResult[]>([]);
// 成功提示
const [successAlertVisible, setSuccessAlertVisible] = useState(false);
const [successAlertContent, setSuccessAlertContent] = useState<string>("");
// 标记拖拽题是否已完成
const [quiz2Completed, setQuiz2Completed] = useState(false);
// 学习引导弹窗
@@ -272,30 +273,33 @@ const ChenyunPlace7 = () => {
<GuideStepsItem speaker="guide">
有人计算,一百元法币,在一九三七年可买两头牛,一九四五年只能买两个鸡蛋,一九四七年只能买一个煤球,到一九四九年五月连一粒米也买不到。可见,当时通货膨胀多么严重。
</GuideStepsItem>
<GuideStepsItem speaker="guide">
打击投机资本,稳定金融物价,陈云代中央起草《中共中央关于打击银元使人民币占领阵地的指示》,提出以强硬手段打击投机势力。
</GuideStepsItem>
</GuideSteps>
{/* 单选题1:在视频1结束后出现(点击即判定) */}
<QuizPanel
<SingleChoiceQuizPanel
visible={quizVisible}
zIndex={10002}
title="题目1(单选题):1949年6月,中央央指导打击银元投机活动,金条、银元一律由人民银行挂牌收兑,铁路交通事业、税收一律收入人民币。同时,上海军管会查封了证券大楼。这次“银元之战”()"
title={`题目1(单选题):1949年6月,中共中央指示打击银元投机活动,金条、银元一律由人民银行挂牌收兑,铁路交通事业,税收一律收人民币。同时,上海军管会查封了证券大楼。这次“银元之战”(\xa0\xa0\xa0\xa0)。`}
options={QUIZ1_OPTIONS}
value={quizAnswer}
error={quizError}
onChange={(val) => {
correctAnswer={"B"}
errorMessage={quizError}
onSubmit={(val) => {
setQuizAnswer(val);
if (val === "B") {
setQuizVisible(false);
setQuizError("");
// 显示成功提示
setSuccessAlertVisible(true);
} else {
// 使用对应选项的错误提示,如果不存在则使用通用提示
setQuizError(
QUIZ1_ERROR_HINTS[val] ||
"再想一想,注意题干中的时间和提示信息哦~"
);
}
setQuizVisible(false);
setQuizError("");
// 显示成功提示
setSuccessAlertVisible(true);
setSuccessAlertContent(
"“银元之战”属于当时人民政府整顿金融的重要举措,黄金、银元投机不利于人民币币值稳定和流通,因此“银元之战”打击贵金属投机活动,有利于稳定人民币的发行和地位"
);
}}
onWrongSelect={(val) => {
return (
QUIZ1_ERROR_HINTS[val] || "再想一想,注意题干中的时间和提示信息哦~"
);
}}
/>
@@ -371,6 +375,7 @@ const ChenyunPlace7 = () => {
<SuccessAlert
visible={successAlertVisible}
title="恭喜你, 选择正确!"
content={successAlertContent}
onClose={() => {
setSuccessAlertVisible(false);
// 如果是单选题答对且拖拽题还没开始,继续进入第二阶段