Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
ff15b763
Commit
ff15b763
authored
Mar 25, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:调试
parent
dd8a438d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
src/modules/teach-tool/components/NewQuestionTab.jsx
+3
-2
src/modules/teach-tool/components/QuestionEditor.jsx
+1
-0
No files found.
src/modules/teach-tool/components/NewQuestionTab.jsx
View file @
ff15b763
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Author: yuananting
* @Date: 2021-02-25 14:34:29
* @Date: 2021-02-25 14:34:29
* @LastEditors: yuananting
* @LastEditors: yuananting
* @LastEditTime: 2021-03-25 18:
30:21
* @LastEditTime: 2021-03-25 18:
50:43
* @Description: 助学工具-题库-题目管理-新建题目Tab
* @Description: 助学工具-题库-题目管理-新建题目Tab
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -103,7 +103,7 @@ class NewQuestionTab extends Component {
...
@@ -103,7 +103,7 @@ class NewQuestionTab extends Component {
}
}
shouldComponentUpdate
(
nextProps
,
nextState
)
{
shouldComponentUpdate
(
nextProps
,
nextState
)
{
console
.
log
(
"nextProps"
,
nextProps
)
console
.
log
(
"nextProps"
,
nextProps
)
;
const
{
questionInfo
}
=
nextProps
;
const
{
questionInfo
}
=
nextProps
;
if
(
this
.
props
.
questionInfo
!==
questionInfo
)
{
if
(
this
.
props
.
questionInfo
!==
questionInfo
)
{
console
.
log
(
"4. 组件更新:"
,
questionInfo
.
gapFillingAnswerList
);
console
.
log
(
"4. 组件更新:"
,
questionInfo
.
gapFillingAnswerList
);
...
@@ -589,6 +589,7 @@ class NewQuestionTab extends Component {
...
@@ -589,6 +589,7 @@ class NewQuestionTab extends Component {
console
.
log
(
111
,
data
,
idx
);
console
.
log
(
111
,
data
,
idx
);
const
{
gapFillingAnswer
}
=
this
.
state
;
const
{
gapFillingAnswer
}
=
this
.
state
;
let
_gap
=
this
.
state
.
gapFillingAnswer
;
let
_gap
=
this
.
state
.
gapFillingAnswer
;
console
.
log
(
data
.
length
,
idx
)
if
(
data
.
length
<=
idx
)
{
if
(
data
.
length
<=
idx
)
{
_gap
.
splice
(
idx
,
1
);
_gap
.
splice
(
idx
,
1
);
}
else
{
}
else
{
...
...
src/modules/teach-tool/components/QuestionEditor.jsx
View file @
ff15b763
...
@@ -192,6 +192,7 @@ class QuestionEditor extends Component {
...
@@ -192,6 +192,7 @@ class QuestionEditor extends Component {
let
idx
=
0
;
let
idx
=
0
;
if
(
prevList
&&
ids
)
{
if
(
prevList
&&
ids
)
{
console
.
log
(
prevList
,
ids
)
idx
=
this
.
getNewArr
(
prevList
,
ids
);
idx
=
this
.
getNewArr
(
prevList
,
ids
);
const
oldLen
=
prevList
.
length
;
const
oldLen
=
prevList
.
length
;
idx
=
idx
>=
oldLen
?
idx
-
oldLen
:
idx
;
idx
=
idx
>=
oldLen
?
idx
-
oldLen
:
idx
;
...
...
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