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
8ef73141
Commit
8ef73141
authored
Mar 25, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:灰度填空修改合并
parent
9fcfeafa
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
17 deletions
+3
-17
src/modules/teach-tool/components/NewQuestionTab.jsx
+3
-14
src/modules/teach-tool/components/QuestionEditor.jsx
+0
-3
No files found.
src/modules/teach-tool/components/NewQuestionTab.jsx
View file @
8ef73141
...
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-25 14:34:29
* @LastEditors: yuananting
* @LastEditTime: 2021-03-25 19:
38:03
* @LastEditTime: 2021-03-25 19:
52:09
* @Description: 助学工具-题库-题目管理-新建题目Tab
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -103,18 +103,13 @@ class NewQuestionTab extends Component {
}
shouldComponentUpdate
(
nextProps
,
nextState
)
{
console
.
log
(
"nextProps"
,
nextProps
);
const
{
questionInfo
}
=
nextProps
;
if
(
this
.
props
.
questionInfo
!==
questionInfo
)
{
console
.
log
(
"4. 组件更新:"
,
questionInfo
.
gapFillingAnswerList
);
this
.
setState
(
{
this
.
setState
({
gapFillingAnswer
:
JSON
.
parse
(
JSON
.
stringify
(
questionInfo
.
gapFillingAnswerList
)
),
},
()
=>
console
.
log
(
"___________________"
,
this
.
state
.
gapFillingAnswer
)
);
});
this
.
setState
(
{
stemContent
:
JSON
.
parse
(
...
...
@@ -586,23 +581,17 @@ class NewQuestionTab extends Component {
}
changeBlankCount
=
(
data
,
idx
)
=>
{
console
.
log
(
123
,
data
,
idx
);
const
{
gapFillingAnswer
}
=
this
.
state
;
let
_gap
=
this
.
state
.
gapFillingAnswer
;
console
.
log
(
data
.
length
,
idx
)
if
(
data
.
length
<=
idx
)
{
_gap
.
splice
(
idx
,
1
);
}
else
{
data
.
forEach
((
item
,
index
)
=>
{
if
(
index
===
idx
)
{
if
(
_gap
.
length
<
data
.
length
)
{
console
.
log
(
1
)
_gap
.
splice
(
idx
,
0
,
{
correctAnswerList
:
[]
});
}
else
if
(
_gap
.
length
>
data
.
length
)
{
console
.
log
(
2
)
_gap
.
splice
(
idx
,
1
);
}
else
{
console
.
log
(
3
)
_gap
.
splice
(
idx
,
1
,
{
correctAnswerList
:
[]
});
}
}
...
...
src/modules/teach-tool/components/QuestionEditor.jsx
View file @
8ef73141
...
...
@@ -160,7 +160,6 @@ class QuestionEditor extends Component {
}
editorRoot
.
config
.
onchange
=
(
html
)
=>
{
setTimeout
(()
=>
{
const
conLen
=
html
.
replace
(
/<
(?!
img|input
)
.*
?
>/g
,
""
).
length
;
counter
++
;
const
{
focusFlag
}
=
this
.
state
;
...
...
@@ -193,7 +192,6 @@ class QuestionEditor extends Component {
let
idx
=
0
;
if
(
prevList
&&
ids
)
{
console
.
log
(
prevList
,
ids
);
idx
=
this
.
getNewArr
(
prevList
,
ids
);
const
oldLen
=
prevList
.
length
;
idx
=
idx
>=
oldLen
?
idx
-
oldLen
:
idx
;
...
...
@@ -215,7 +213,6 @@ class QuestionEditor extends Component {
onChange
&&
onChange
(
html
,
this
.
state
.
contentLength
);
}
);
},
0
);
};
editorRoot
.
config
.
onblur
=
()
=>
{
...
...
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