feat: 更新 ESLint 和 Prettier 配置,增强代码质量管理
- 在 .gitignore 中添加 public/audio/* 以忽略音频文件。 - 更新 bun.lock,添加 eslint-config-prettier 和 eslint-plugin-prettier 依赖,确保 ESLint 与 Prettier 的兼容性。 - 修改 eslint.config.ts,整合 Prettier 规则,优化代码风格一致性。 - 在 package.json 中添加 lint:fix 和 format 脚本,简化代码格式化和修复流程。 - 更新 tailwind.config.ts 和其他组件文件,统一代码风格,提升可读性。
This commit is contained in:
1 parent
5d00adc1a5
commit
76c67b492e
216 files changed
+12454
-13976
No files matched your search
@@ -2,29 +2,29 @@
|
||||
* 银元之战题目组件
|
||||
* 包含多选题1、多选题2、旁白2
|
||||
*/
|
||||
import { Narration, MultipleChoiceQuizPanel } from "@/components";
|
||||
import SuccessAlert from "@/components/layout/alert/success-alert";
|
||||
import { getPublicPath } from "@/lib/utils";
|
||||
import { Narration, MultipleChoiceQuizPanel } from '@/components'
|
||||
import SuccessAlert from '@/components/layout/alert/success-alert'
|
||||
import { getPublicPath } from '@/lib/utils'
|
||||
|
||||
export interface YinyuanQuizzesProps {
|
||||
/** 是否显示多选题1 */
|
||||
showQuiz1: boolean;
|
||||
showQuiz1: boolean
|
||||
/** 是否显示旁白2 */
|
||||
showNarration2: boolean;
|
||||
showNarration2: boolean
|
||||
/** 旁白2文本 */
|
||||
narration2Text: string;
|
||||
narration2Text: string
|
||||
/** 是否显示多选题2 */
|
||||
showQuiz2: boolean;
|
||||
showQuiz2: boolean
|
||||
/** 是否显示成功提示框 */
|
||||
showSuccessAlert: boolean;
|
||||
showSuccessAlert: boolean
|
||||
/** 多选题1提交回调 */
|
||||
onQuiz1Submit: (values: string[], isCorrect: boolean) => void;
|
||||
onQuiz1Submit: (values: string[], isCorrect: boolean) => void
|
||||
/** 旁白2关闭回调 */
|
||||
onNarration2Close: () => void;
|
||||
onNarration2Close: () => void
|
||||
/** 多选题2提交回调 */
|
||||
onQuiz2Submit: (values: string[], isCorrect: boolean) => void;
|
||||
onQuiz2Submit: (values: string[], isCorrect: boolean) => void
|
||||
/** 成功提示框继续回调 */
|
||||
onSuccessAlertContinue: () => void;
|
||||
onSuccessAlertContinue: () => void
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -49,11 +49,11 @@ export const YinyuanQuizzes = ({
|
||||
visible={showQuiz1}
|
||||
title="【多选】面对银元投机狂潮,你认为首要突破口是? "
|
||||
options={[
|
||||
{ value: "A", label: "A. 政治攻势(警告、约谈)" },
|
||||
{ value: "B", label: "B. 经济手段(抛售银元,以银元打银元)" },
|
||||
{ value: "C", label: "C. 舆论动员(宣传人民币信用,发动群众)" },
|
||||
{ value: 'A', label: 'A. 政治攻势(警告、约谈)' },
|
||||
{ value: 'B', label: 'B. 经济手段(抛售银元,以银元打银元)' },
|
||||
{ value: 'C', label: 'C. 舆论动员(宣传人民币信用,发动群众)' },
|
||||
]}
|
||||
correctAnswer={["A", "B", "C"]}
|
||||
correctAnswer={['A', 'B', 'C']}
|
||||
errorMessage="单一措施效果有限,请尝试综合施策。"
|
||||
minSelections={1}
|
||||
maxSelections={3}
|
||||
@@ -61,7 +61,7 @@ export const YinyuanQuizzes = ({
|
||||
submitText="提交"
|
||||
onSubmit={onQuiz1Submit}
|
||||
onError={(error) => {
|
||||
console.log("错误信息:", error);
|
||||
console.log('错误信息:', error)
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -71,7 +71,7 @@ export const YinyuanQuizzes = ({
|
||||
visible={showNarration2}
|
||||
onClose={onNarration2Close}
|
||||
enableAnimation={false}
|
||||
audioSrc={getPublicPath("audio/chenyun/mp3_chenyun_31.mp3")}
|
||||
audioSrc={getPublicPath('audio/chenyun/mp3_chenyun_31.mp3')}
|
||||
/>
|
||||
|
||||
{/* 多选题2(图3)- 关闭旁白后显示 */}
|
||||
@@ -79,11 +79,11 @@ export const YinyuanQuizzes = ({
|
||||
visible={showQuiz2}
|
||||
title="【多选】面对投机商的猖狂反扑,下一步应采取哪些决定性措施?"
|
||||
options={[
|
||||
{ value: "A", label: "A. 加大银元抛售量,耗尽投机资本" },
|
||||
{ value: "B", label: "B. 查封投机核心场所,逮捕首要分子" },
|
||||
{ value: "C", label: "C. 颁布法令,严禁银元计价流通" },
|
||||
{ value: 'A', label: 'A. 加大银元抛售量,耗尽投机资本' },
|
||||
{ value: 'B', label: 'B. 查封投机核心场所,逮捕首要分子' },
|
||||
{ value: 'C', label: 'C. 颁布法令,严禁银元计价流通' },
|
||||
]}
|
||||
correctAnswer={["A", "B", "C"]}
|
||||
correctAnswer={['A', 'B', 'C']}
|
||||
errorMessage="单一措施效果有限,请尝试综合施策。"
|
||||
minSelections={1}
|
||||
maxSelections={3}
|
||||
@@ -91,7 +91,7 @@ export const YinyuanQuizzes = ({
|
||||
submitText="提交"
|
||||
onSubmit={onQuiz2Submit}
|
||||
onError={(error) => {
|
||||
console.log("错误信息:", error);
|
||||
console.log('错误信息:', error)
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -103,5 +103,5 @@ export const YinyuanQuizzes = ({
|
||||
onContinue={onSuccessAlertContinue}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
};
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user