Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TianGongKaiWu-20251203
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
SparkProjects
TianGongKaiWu-20251203
Commits
04cd49f3
Commit
04cd49f3
authored
Dec 16, 2025
by
天马流星拳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 添加调试日志以检查答案选择逻辑
添加console.log调试语句来检查selAnswer、index和correctAnswers的值,帮助排查答案选择逻辑的问题
parent
04d50fdc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
index.jsx
src/panels/answerPanel/index.jsx
+1
-0
No files found.
src/panels/answerPanel/index.jsx
View file @
04cd49f3
...
...
@@ -108,6 +108,7 @@ class AnswerPanel extends React.Component {
<
div
className=
'question-title'
>
{
qsInfo
.
content
||
''
}
</
div
>
<
div
className=
'answer-con'
>
{
(
qsInfo
.
answers
||
[]).
map
((
el
,
index
)
=>
{
console
.
log
(
'6666666, selAnswer -- index -- index + 1 -- correctAnswers --correctAnswers.includes'
,
selAnswer
,
index
,
index
+
1
+
''
,
correctAnswers
,
correctAnswers
.
includes
(
index
+
1
+
''
));
const
str
=
labelObj
[
index
]
+
'、'
+
el
;
let
len
=
this
.
getBLen
(
str
);
return
<
div
className=
{
`${len > 44 ? 'toolong' : ''} answer-item ${(selAnswer === index + 1 + '') && correctAnswers.length > 0 && !correctAnswers.includes(index + 1 + '') ? 'error' : ''} ${correctAnswers.includes(index + 1 + '') ? 'correct' : ''}`
}
key=
{
index
}
onClick=
{
_asyncThrottle
(()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment