Commit 0365370f by zhujian

'fix'

parent 64c84ff2
......@@ -64,40 +64,40 @@ class GraphicsEditor extends React.Component {
class ImageMenu extends BtnMenu {
constructor(editor) {
// data-title属性表示当鼠标悬停在该按钮上时提示该按钮的功能简述
const $elem = E.$(
`<div class="w-e-menu" data-title="图片">
const $elem = E.$(
`<div class="w-e-menu" data-title="图片">
<i class="w-e-icon-image"></i>
</div>`
)
super($elem, editor)
)
super($elem, editor)
}
// 菜单点击事件
clickHandler() {
Bus.trigger(`graphicsEditorImage${isIntro ? '' : 'Content'}`)
}
tryChangeActive() {
}
}
class VideoMenu extends BtnMenu {
constructor(editor) {
// data-title属性表示当鼠标悬停在该按钮上时提示该按钮的功能简述
const $elem = E.$(
`<div class="w-e-menu" data-title="视频">
const $elem = E.$(
`<div class="w-e-menu" data-title="视频">
<i class="w-e-icon-play"></i>
</div>`
)
super($elem, editor)
)
super($elem, editor)
}
// 菜单点击事件
clickHandler() {
Bus.trigger('graphicsEditorVideo')
}
tryChangeActive() {
}
}
......@@ -181,7 +181,7 @@ class GraphicsEditor extends React.Component {
this.editorInt.create();
this.editorInt.txt.html(detail.content);
}
// 选择图文
handleSelectVideo = (file) => {
this.setState({
......@@ -224,9 +224,9 @@ class GraphicsEditor extends React.Component {
render() {
const { editorId, textLength, showSelectImageModal, showSelectVideoModal } = this.state;
const { limitLength = 1000, isIntro, maxLimit } = this.props;
return <div className={`graphics-editor-container${isIntro ? ' introduce' : ''}`}>
<div className="editor-box" id={`editor${editorId}`}></div>
<div className="editor-tips">({textLength}/{maxLimit || 100000})</div>
return <div className={`graphics-editor-container${isIntro ? ' introduce' : ''} ${(textLength > maxLimit)&& 'warning'}`}>
<div className="editor-box" id={`editor${editorId}`} ></div>
<div className="editor-tips">( {(textLength > maxLimit) ? <span style={{ color: 'red' }} >{textLength}</span> : textLength}/{maxLimit || 100000})</div>
{showSelectVideoModal &&
<SelectPrepareFileModal
operateType="select"
......@@ -246,7 +246,7 @@ class GraphicsEditor extends React.Component {
onSelect={this.handleSelectVideo}
/>
}
{showSelectImageModal &&
{showSelectImageModal &&
<SelectPrepareFileModal
key="basic"
operateType="select"
......
......@@ -23,7 +23,7 @@
background-color: #fff !important;
border: none !important;
border-bottom: 1px solid #E8E8E8 !important;
width: 700px;
max-width: 700px;
}
.w-e-text-container {
......@@ -49,4 +49,8 @@
height: ~'calc(100% - 69px)' !important;
}
}
&.warning{
border-color: red;
}
}
\ No newline at end of file
......@@ -396,7 +396,15 @@ function ExaminationManager(props: any) {
</div>
<Route path={`${match.url}/add`} render={() => {
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={() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment