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
10ada5b6
Commit
10ada5b6
authored
Mar 23, 2021
by
nineyat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:选项输入纯空格提示
parent
646085c9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
src/modules/teach-tool/QuestionCategoryManage.jsx
+2
-3
src/modules/teach-tool/components/NewQuestionTab.jsx
+7
-1
No files found.
src/modules/teach-tool/QuestionCategoryManage.jsx
View file @
10ada5b6
...
...
@@ -224,14 +224,13 @@ class QuestionCategoryManage extends Component {
let
dragNodes
=
[];
if
(
dragNode
.
sonCategoryList
&&
dragNode
.
sonCategoryList
.
length
>
0
)
{
dragNode
.
sonCategoryList
.
forEach
((
item
)
=>
{
dragNodes
.
push
(
item
.
id
);
dragNodes
.
push
(
item
.
categoryLevel
);
if
(
item
.
sonCategoryList
&&
item
.
sonCategoryList
.
length
>
0
)
{
dragNodes
=
dragNodes
.
concat
(
this
.
getDragNodesLevel
(
item
));
}
});
}
return
dragNodes
;
return
[...
new
Set
(
dragNodes
)];
};
onDrop
=
(
info
)
=>
{
...
...
src/modules/teach-tool/components/NewQuestionTab.jsx
View file @
10ada5b6
...
...
@@ -219,10 +219,14 @@ class NewQuestionTab extends Component {
optionUnChecked
=
item
.
isCorrectAnswer
?
optionUnChecked
:
optionUnChecked
+
1
;
let
optionInput
=
optionContent
[
0
].
content
.
replace
(
/<
[^
>
]
+>/g
,
""
);
optionInput
=
optionInput
.
replace
(
/
\&
nbsp
\;
/gi
,
""
);
optionInput
=
optionInput
.
replace
(
/
\s
+/g
,
""
);
if
(
optionContent
.
length
===
1
&&
optionContent
[
0
].
type
===
"RICH_TEXT"
&&
option
Content
[
0
].
textL
ength
===
0
option
Input
.
l
ength
===
0
)
{
this
.
setState
({
[
`optionsValidate_
${
index
}
`
]:
"error"
});
this
.
setState
({
[
`optionsText_
${
index
}
`
]:
"请输入选项"
});
...
...
@@ -670,6 +674,7 @@ class NewQuestionTab extends Component {
list
.
map
((
tag
,
index
)
=>
{
return
(
<
Tag
key=
{
index
}
className=
"edit-tag"
visible
closable
...
...
@@ -1262,6 +1267,7 @@ class NewQuestionTab extends Component {
_
.
map
(
blanksList
,
(
item
,
index
)
=>
{
return
(
<
Form
.
Item
name=
"answer"
validateStatus=
{
this
.
state
[
`optionsValidate_${index}`
]
}
help=
{
this
.
state
[
`optionsText_${index}`
]
}
>
...
...
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