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

+34 -4
View File
@@ -5,8 +5,9 @@ import {
Image,
Cursor,
Video,
Overlay,
StudyGuideModal,
GuideSteps,
GuideStepsItem,
} from "@/components";
import { getBackgroundImage, getStaticImage, getPublicPath } from "@/lib/utils";
import { useNavigate, useParams } from "react-router-dom";
@@ -53,12 +54,20 @@ const ChenyunPlace5 = () => {
// 学习引导弹窗
const [showGuideModal, setShowGuideModal] = useState(true);
// 展品1引导对话
const [guideVisible, setGuideVisible] = useState(false);
const [guideStep, setGuideStep] = useState(0);
const handleOpenExhibit = (index: 1 | 2 | 3) => {
if (index === 3) {
// 展品3:播放视频,不打开展品
setVideoVisible3(true);
return;
}
if (index === 2) {
setGuideVisible(true);
setGuideStep(0);
}
setActiveExhibitId(index);
};
@@ -130,6 +139,27 @@ const ChenyunPlace5 = () => {
/>
)}
{/* 展品1的引导对话 */}
<GuideSteps
visible={guideVisible}
onVisibleChange={setGuideVisible}
currentStep={guideStep}
onStepChange={(step) => setGuideStep(step)}
showMask={false}
highlightSelectors={[]}
zIndex={10000}
>
<GuideStepsItem speaker="student">
小沪,延安时期因为国民党的封锁,陕甘宁边区经济困难。陈云转战陕甘宁边区主持财经工作,他一定遇到了很多经济难题吧。
</GuideStepsItem>
<GuideStepsItem speaker="guide">
1944年新春伊始,陈云开始担任西北财经办事处副主任,工作转到财经方面,这是陈云以主要精力从事领导经济工作的开始。当时,陕甘宁边区在国民党严密封锁下,财经状况严峻,边区物价猛涨,老百姓日常生活必需的布匹和粮食十分缺乏。
</GuideStepsItem>
<GuideStepsItem speaker="guide">
国民党顽固派封锁边区,企图“不让一粒粮、一尺布进入边区”,同时千方百计阻止边区食盐出口。
</GuideStepsItem>
</GuideSteps>
{/* 展品3视频播放(全屏) */}
{videoVisible3 && (
<Video
@@ -150,9 +180,9 @@ const ChenyunPlace5 = () => {
<ExhibitOverlay
visible={activeExhibitId !== null}
src={activeExhibitId ? exhibitSrcMap[activeExhibitId] : ""}
description={
activeExhibitId ? exhibitDescriptionMap[activeExhibitId] : undefined
}
// description={
// activeExhibitId ? exhibitDescriptionMap[activeExhibitId] : undefined
// }
autoPlayDescription={activeExhibitId === 2}
onOpen={() => {
if (activeExhibitId === 2) {