Commit 180cfc43 by chenshu

fix:优化样式

parent 0d79e759
...@@ -165,8 +165,8 @@ class GraphicsEditor extends React.Component { ...@@ -165,8 +165,8 @@ class GraphicsEditor extends React.Component {
render() { render() {
const { editorId, textLength } = this.state; const { editorId, textLength } = this.state;
const { limitLength = 1000 } = this.props; const { limitLength = 1000, isIntro } = this.props;
return <div className="wang-editor-container "> return <div className={`graphics-editor-container${isIntro ? ' introduce' : ''}`}>
<div className="editor-box" id={`editor${editorId}`}></div> <div className="editor-box" id={`editor${editorId}`}></div>
{textLength > limitLength && <div className="editor-tips">超了{textLength - limitLength}个字</div>} {textLength > limitLength && <div className="editor-tips">超了{textLength - limitLength}个字</div>}
</div> </div>
......
.wang-editor-container { .graphics-editor-container {
border: 1px solid #E8E8E8; border: 1px solid #E8E8E8;
border-radius: 4px; border-radius: 4px;
width: 552px; width: 702px;
height: 510px;
position: relative; position: relative;
.w-e-text p, .w-e-text p,
...@@ -14,8 +15,8 @@ ...@@ -14,8 +15,8 @@
.w-e-text pre { .w-e-text pre {
margin: 0; margin: 0;
} }
.w-e-menu .w-e-panel-container { .editor-box {
margin-top: 0 !important; height: 100%;
} }
.w-e-toolbar { .w-e-toolbar {
...@@ -26,7 +27,7 @@ ...@@ -26,7 +27,7 @@
.w-e-text-container { .w-e-text-container {
border: none !important; border: none !important;
height: 88px !important; height: ~'calc(100% - 81px)' !important;
} }
.editor-tips { .editor-tips {
...@@ -40,4 +41,9 @@ ...@@ -40,4 +41,9 @@
height: ~'calc(100vh - 81px)' !important; height: ~'calc(100vh - 81px)' !important;
} }
} }
&.introduce {
.w-e-text-container {
height: ~'calc(100% - 41px)' !important;
}
}
} }
\ No newline at end of file
...@@ -300,7 +300,7 @@ class AddGraphicsCourse extends React.Component { ...@@ -300,7 +300,7 @@ class AddGraphicsCourse extends React.Component {
const { ossUrl } = file; const { ossUrl } = file;
const { courseMedia } = this.state; const { courseMedia } = this.state;
this.setState({ this.setState({
courseMedia: `${courseMedia}<p style="width: 100%;padding-top: 56.25%;position: relative;"><iframe style="position: absolute;width: 100%;height: 100%;top: 0;left: 0;" src="${ossUrl}" /><br><p>` courseMedia: `${courseMedia}<p style="width: 100%;padding-top: 56.25%;position: relative;"><iframe style="position: absolute;width: 100%;height: 100%;top: 0;left: 0;" src="${ossUrl}" /><br/><p>`
}); });
} }
...@@ -311,7 +311,7 @@ class AddGraphicsCourse extends React.Component { ...@@ -311,7 +311,7 @@ class AddGraphicsCourse extends React.Component {
const { ossUrl } = file; const { ossUrl } = file;
const { courseMedia, introduce, isContent } = this.state; const { courseMedia, introduce, isContent } = this.state;
this.setState({ this.setState({
[isContent ? 'courseMedia' : 'introduce']: `${isContent ? courseMedia : introduce}<p><img style="max-width: 100%;" src="${ossUrl}" /><br><p>` [isContent ? 'courseMedia' : 'introduce']: `${isContent ? courseMedia : introduce}<p><img style="max-width: 100%;" src="${ossUrl}" /><br/><p>`
}); });
} }
......
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