diff --git a/web/src/pages/QuestionManagement.tsx b/web/src/pages/QuestionManagement.tsx index 9254a99..4149fc5 100644 --- a/web/src/pages/QuestionManagement.tsx +++ b/web/src/pages/QuestionManagement.tsx @@ -439,7 +439,7 @@ const QuestionManagement: React.FC = () => { allowClear showSearch filterOption={(input, option) => - (option?.label ?? '').toLowerCase().includes(input.toLowerCase()) + String(option?.label ?? '').toLowerCase().includes(input.toLowerCase()) } /> diff --git a/web/src/pages/UserDetail.tsx b/web/src/pages/UserDetail.tsx index d240b09..84a0116 100644 --- a/web/src/pages/UserDetail.tsx +++ b/web/src/pages/UserDetail.tsx @@ -4,7 +4,6 @@ import { Card, Button, Typography, - Space, message, Tag, Row, diff --git a/web/src/pages/WrongQuestions.tsx b/web/src/pages/WrongQuestions.tsx index da7fbe3..514a10f 100644 --- a/web/src/pages/WrongQuestions.tsx +++ b/web/src/pages/WrongQuestions.tsx @@ -239,7 +239,7 @@ const WrongQuestions: React.FC = () => { placeholder="排序方式" style={{ width: 140 }} defaultValue="time" - onChange={(value) => setFilter({ ...filter, sort: value })} + onChange={(value: 'time' | 'wrong_count' | 'mastery_level') => setFilter({ ...filter, sort: value })} > @@ -251,7 +251,7 @@ const WrongQuestions: React.FC = () => { type="primary" icon={} onClick={handlePractice} - disabled={!wrongQuestions.length || (stats?.total_wrong === stats?.mastered && stats?.total_wrong > 0)} + disabled={!wrongQuestions.length || (stats?.total_wrong === stats?.mastered && (stats?.total_wrong ?? 0) > 0)} className={styles.primaryButton} > 开始练习