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
0365370f
Commit
0365370f
authored
Apr 14, 2021
by
zhujian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'fix'
parent
64c84ff2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
20 deletions
+33
-20
src/modules/course-manage/components/GraphicsEditor.jsx
+18
-18
src/modules/course-manage/components/GraphicsEditor.less
+6
-1
src/modules/teach-tool/examination-manager/Index.tsx
+9
-1
No files found.
src/modules/course-manage/components/GraphicsEditor.jsx
View file @
0365370f
...
@@ -64,40 +64,40 @@ class GraphicsEditor extends React.Component {
...
@@ -64,40 +64,40 @@ class GraphicsEditor extends React.Component {
class
ImageMenu
extends
BtnMenu
{
class
ImageMenu
extends
BtnMenu
{
constructor
(
editor
)
{
constructor
(
editor
)
{
// data-title属性表示当鼠标悬停在该按钮上时提示该按钮的功能简述
// data-title属性表示当鼠标悬停在该按钮上时提示该按钮的功能简述
const
$elem
=
E
.
$
(
const
$elem
=
E
.
$
(
`<div class="w-e-menu" data-title="图片">
`<div class="w-e-menu" data-title="图片">
<i class="w-e-icon-image"></i>
<i class="w-e-icon-image"></i>
</div>`
</div>`
)
)
super
(
$elem
,
editor
)
super
(
$elem
,
editor
)
}
}
// 菜单点击事件
// 菜单点击事件
clickHandler
()
{
clickHandler
()
{
Bus
.
trigger
(
`graphicsEditorImage
${
isIntro
?
''
:
'Content'
}
`
)
Bus
.
trigger
(
`graphicsEditorImage
${
isIntro
?
''
:
'Content'
}
`
)
}
}
tryChangeActive
()
{
tryChangeActive
()
{
}
}
}
}
class
VideoMenu
extends
BtnMenu
{
class
VideoMenu
extends
BtnMenu
{
constructor
(
editor
)
{
constructor
(
editor
)
{
// data-title属性表示当鼠标悬停在该按钮上时提示该按钮的功能简述
// data-title属性表示当鼠标悬停在该按钮上时提示该按钮的功能简述
const
$elem
=
E
.
$
(
const
$elem
=
E
.
$
(
`<div class="w-e-menu" data-title="视频">
`<div class="w-e-menu" data-title="视频">
<i class="w-e-icon-play"></i>
<i class="w-e-icon-play"></i>
</div>`
</div>`
)
)
super
(
$elem
,
editor
)
super
(
$elem
,
editor
)
}
}
// 菜单点击事件
// 菜单点击事件
clickHandler
()
{
clickHandler
()
{
Bus
.
trigger
(
'graphicsEditorVideo'
)
Bus
.
trigger
(
'graphicsEditorVideo'
)
}
}
tryChangeActive
()
{
tryChangeActive
()
{
}
}
}
}
...
@@ -181,7 +181,7 @@ class GraphicsEditor extends React.Component {
...
@@ -181,7 +181,7 @@ class GraphicsEditor extends React.Component {
this
.
editorInt
.
create
();
this
.
editorInt
.
create
();
this
.
editorInt
.
txt
.
html
(
detail
.
content
);
this
.
editorInt
.
txt
.
html
(
detail
.
content
);
}
}
// 选择图文
// 选择图文
handleSelectVideo
=
(
file
)
=>
{
handleSelectVideo
=
(
file
)
=>
{
this
.
setState
({
this
.
setState
({
...
@@ -224,9 +224,9 @@ class GraphicsEditor extends React.Component {
...
@@ -224,9 +224,9 @@ class GraphicsEditor extends React.Component {
render
()
{
render
()
{
const
{
editorId
,
textLength
,
showSelectImageModal
,
showSelectVideoModal
}
=
this
.
state
;
const
{
editorId
,
textLength
,
showSelectImageModal
,
showSelectVideoModal
}
=
this
.
state
;
const
{
limitLength
=
1000
,
isIntro
,
maxLimit
}
=
this
.
props
;
const
{
limitLength
=
1000
,
isIntro
,
maxLimit
}
=
this
.
props
;
return
<
div
className=
{
`graphics-editor-container${isIntro ? ' introduce' : ''}`
}
>
return
<
div
className=
{
`graphics-editor-container${isIntro ? ' introduce' : ''}
${(textLength > maxLimit)&& 'warning'}
`
}
>
<
div
className=
"editor-box"
id=
{
`editor${editorId}`
}
></
div
>
<
div
className=
"editor-box"
id=
{
`editor${editorId}`
}
></
div
>
<
div
className=
"editor-tips"
>
(
{
textLength
}
/
{
maxLimit
||
100000
}
)
</
div
>
<
div
className=
"editor-tips"
>
(
{
(
textLength
>
maxLimit
)
?
<
span
style=
{
{
color
:
'red'
}
}
>
{
textLength
}
</
span
>
:
textLength
}
/
{
maxLimit
||
100000
}
)
</
div
>
{
showSelectVideoModal
&&
{
showSelectVideoModal
&&
<
SelectPrepareFileModal
<
SelectPrepareFileModal
operateType=
"select"
operateType=
"select"
...
@@ -246,7 +246,7 @@ class GraphicsEditor extends React.Component {
...
@@ -246,7 +246,7 @@ class GraphicsEditor extends React.Component {
onSelect=
{
this
.
handleSelectVideo
}
onSelect=
{
this
.
handleSelectVideo
}
/>
/>
}
}
{
showSelectImageModal
&&
{
showSelectImageModal
&&
<
SelectPrepareFileModal
<
SelectPrepareFileModal
key=
"basic"
key=
"basic"
operateType=
"select"
operateType=
"select"
...
...
src/modules/course-manage/components/GraphicsEditor.less
View file @
0365370f
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
background-color: #fff !important;
background-color: #fff !important;
border: none !important;
border: none !important;
border-bottom: 1px solid #E8E8E8 !important;
border-bottom: 1px solid #E8E8E8 !important;
width: 700px;
max-
width: 700px;
}
}
.w-e-text-container {
.w-e-text-container {
...
@@ -49,4 +49,8 @@
...
@@ -49,4 +49,8 @@
height: ~'calc(100% - 69px)' !important;
height: ~'calc(100% - 69px)' !important;
}
}
}
}
&.warning{
border-color: red;
}
}
}
\ No newline at end of file
src/modules/teach-tool/examination-manager/Index.tsx
View file @
0365370f
...
@@ -396,7 +396,15 @@ function ExaminationManager(props: any) {
...
@@ -396,7 +396,15 @@ function ExaminationManager(props: any) {
</
div
>
</
div
>
<
Route
path=
{
`${match.url}/add`
}
render=
{
()
=>
{
<
Route
path=
{
`${match.url}/add`
}
render=
{
()
=>
{
return
<
AddExam
freshList=
{
()
=>
{
return
<
AddExam
freshList=
{
()
=>
{
getList
()
let
_query
:
any
=
{
...
queryRef
.
current
};
if
(
_query
.
current
!=
1
)
{
_query
.
current
=
1
;
setQuery
(
_query
)
}
else
{
getList
()
}
}
}
/>;
}
}
/>;
}
}
/>
}
}
/>
<
Route
path=
{
`${match.url}/edit/:id`
}
render=
{
()
=>
{
<
Route
path=
{
`${match.url}/edit/:id`
}
render=
{
()
=>
{
...
...
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