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
c1270734
Commit
c1270734
authored
May 19, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/yuananting/20210327/test-paper' into gray
parents
8c19c551
1483c43b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
11 deletions
+56
-11
src/modules/teach-tool/question-manage/components/QuestionEditor.jsx
+3
-2
src/modules/teach-tool/question-manage/components/QuestionEditor.less
+18
-2
src/modules/teach-tool/question-manage/components/QuestionList.jsx
+14
-3
src/modules/teach-tool/question-manage/modal/PreviewQuestionModal.less
+21
-4
No files found.
src/modules/teach-tool/question-manage/components/QuestionEditor.jsx
View file @
c1270734
...
...
@@ -120,7 +120,7 @@ class QuestionEditor extends Component {
};
editorRoot
.
config
.
zIndex
=
999
;
editorRoot
.
config
.
placeholder
=
""
;
editorRoot
.
config
.
pasteFilterStyle
=
fals
e
;
editorRoot
.
config
.
pasteFilterStyle
=
tru
e
;
editorRoot
.
config
.
pasteIgnoreImg
=
true
;
editorRoot
.
config
.
focus
=
false
;
// 自定义处理粘贴的文本内容
...
...
@@ -133,10 +133,11 @@ class QuestionEditor extends Component {
str1
=
str1
.
replace
(
/
[
|
]
*
\n
/g
,
"
\
n"
);
str1
=
str1
.
replace
(
/
\&
nbsp
\;
/gi
,
" "
);
str1
=
str1
.
replace
(
/
[\r\n]
/g
,
""
);
str1
=
str1
.
replace
(
/<
\/?
a.*
?
>/g
,
""
);
var
str2
=
content
;
// 保留空格和换行的其他字符
str2
=
str2
.
replace
(
/<xml>
[\s\S]
*
?
<
\/
xml>/gi
,
""
);
str2
=
str2
.
replace
(
/<style>
[\s\S]
*
?
<
\/
style>/gi
,
""
);
str2
=
str2
.
replace
(
/<
(?!
br
)
.*
?
>/g
,
""
);
str2
=
str2
.
replace
(
/<
\/?
a
.*
?
>/g
,
""
);
if
(
editorRoot
.
txt
.
text
().
length
+
str1
.
length
>
1000
)
{
content
=
str2
.
substring
(
0
,
1000
);
message
.
error
(
"内容过长,不能超过1000字"
);
...
...
src/modules/teach-tool/question-manage/components/QuestionEditor.less
View file @
c1270734
...
...
@@ -38,10 +38,18 @@
border: 1px solid #e8e8e8;
display: flex;
justify-content: space-between;
font-size: 14px !important;
.editor-box_content {
width: calc(100% - 80px);
p {
display: inline;
font-size: 14px !important;
}
*:not(p){
font-weight: normal !important;
font-size: 14px !important;
font-style: normal !important;
text-decoration: none !important;
margin: 0 !important;
}
}
.editor-limit {
...
...
@@ -56,13 +64,21 @@
border-radius: 4px;
padding: 4px 0;
border: 1px solid #e8e8e8;
font-size: 14px !important;
.editor-box_content {
max-height: 110px;
overflow: auto;
p {
display: inline
;
font-size: 14px !important
;
overflow-y: scroll;
}
*:not(p) {
font-weight: normal !important;
font-size: 14px !important;
font-style: normal !important;
text-decoration: none !important;
margin: 0 !important;
}
}
.editor-limit {
text-align: right;
...
...
src/modules/teach-tool/question-manage/components/QuestionList.jsx
View file @
c1270734
...
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-25 11:23:47
* @LastEditors: yuananting
* @LastEditTime: 2021-0
4-12 14:14:1
9
* @LastEditTime: 2021-0
5-18 16:10:4
9
* @Description: 助学工具-题库-题目列表数据
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -225,16 +225,27 @@ class QuestionList extends Component {
handleVal
=
handleVal
.
replace
(
/<
(?!
img|input
)
.*
?
>/g
,
""
);
handleVal
=
handleVal
.
replace
(
/<
\s?
input
[^
>
]
*>/gi
,
"_、"
);
handleVal
=
handleVal
.
replace
(
/
\&
nbsp
\;
/gi
,
" "
);
handleVal
=
handleVal
.
replace
(
/style
\s
*
?
=
\s
*
?([
‘"
])[\s\S]
*
?\1
/gi
,
""
);
return
(
<
Tooltip
overlayClassName=
"aid-tool-list"
title=
{
<
div
style=
{
{
maxWidth
:
700
,
width
:
"auto"
}
}
>
{
handleVal
}
</
div
>
<
div
style=
{
{
maxWidth
:
700
,
width
:
"auto"
}
}
dangerouslySetInnerHTML=
{
{
__html
:
handleVal
,
}
}
/>
}
placement=
"topLeft"
overlayStyle=
{
{
maxWidth
:
700
}
}
>
{
handleVal
}
<
div
className=
"one-line-text"
dangerouslySetInnerHTML=
{
{
__html
:
handleVal
,
}
}
/>
</
Tooltip
>
);
},
...
...
src/modules/teach-tool/question-manage/modal/PreviewQuestionModal.less
View file @
c1270734
...
...
@@ -32,8 +32,13 @@
color: #666666;
.input-box {
margin-bottom: 8px;
* {
display: inline-block;
display: inline-block;
*:not(p) {
font-weight: normal !important;
font-size: 14px !important;
font-style: normal !important;
text-decoration: none !important;
margin: 0 !important;
}
}
.picture-box {
...
...
@@ -102,6 +107,13 @@
display: inline-block;
max-width: calc(100% - 20px);
vertical-align: top;
*:not(p) {
font-weight: normal !important;
font-size: 14px !important;
font-style: normal !important;
text-decoration: none !important;
margin: 0 !important;
}
}
}
...
...
@@ -197,8 +209,13 @@
color: #666666;
.desc-input-box {
margin-bottom: 8px;
* {
display: inline-block;
display: inline-block;
*:not(p) {
font-weight: normal !important;
font-size: 14px !important;
font-style: normal !important;
text-decoration: none !important;
margin: 0 !important;
}
}
.desc-picture-box {
...
...
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