Commit c8602db7 authored by wangxuelai's avatar wangxuelai

''

parent d0b70835
......@@ -17,6 +17,6 @@
</head>
<body>
<div id="root"></div>
<script src="dist/main.js?1576311500361" charset="utf-8"></script>
<script src="dist/main.js?1576316635860" charset="utf-8"></script>
</body>
</html>
\ No newline at end of file
import React from 'react';
import { connect } from 'dva';
import { List, Icon, DatePicker, Form, Card, Button, Menu, Dropdown, Input, Pagination, Row, Col, Popover } from 'antd';
import moment from 'moment';
import pageStyle from './CourseBox.less';
......@@ -95,6 +96,8 @@ class CourseBoxForm extends React.Component {
sizeChange,
onChangeCourseList,
refresh,
screenIsBig,
collapsed,
} = this.props;
const { getFieldDecorator } = this.props.form;
const formItemModalLineLayout = {
......@@ -327,11 +330,19 @@ class CourseBoxForm extends React.Component {
uEditorChange={this.uEditorSingleChange}
/>
</FormItem>
<FormItem {...formItemModalLineLayout}>
<Button type="primary" htmlType="submit" style={{ marginRight: 20 }} loading={singleCourseSubmitting}>{singleCourseSubmitting ? '保存中...' : '保存'}</Button>
<Button type="primary" onClick={toAddCourseWare} style={{ marginRight: 20 }}>上传课件</Button>
<Button style={{ marginRight: 20 }} onClick={cancelEditSingleCourse}>取消</Button>
</FormItem>
<div
className={pageStyle.submitBtnBox}
style={{
left: screenIsBig ? (!collapsed ? '212px' : '92px') : 0, // eslint-disable-line
width: screenIsBig ? (`calc(100% - ${!collapsed ? '244px' : '124px'})`) : '100%', // eslint-disable-line
}}
>
<FormItem {...formItemModalLineLayout} style={{ marginBottom: 0 }}>
<Button type="primary" htmlType="submit" style={{ marginRight: 20 }} loading={singleCourseSubmitting}>{singleCourseSubmitting ? '保存中...' : '保存'}</Button>
<Button type="primary" onClick={toAddCourseWare} style={{ marginRight: 20 }}>上传课件</Button>
<Button style={{ marginRight: 20 }} onClick={cancelEditSingleCourse}>取消</Button>
</FormItem>
</div>
</Form>
</Col>
</Row>
......@@ -341,4 +352,14 @@ class CourseBoxForm extends React.Component {
}
}
const CourseBox = Form.create()(CourseBoxForm);
export default CourseBox;
function mapStateToProps(state) {
const {
screenIsBig,
collapsed,
} = state.webapp;
return {
screenIsBig,
collapsed,
};
}
export default connect(mapStateToProps)(CourseBox);
.mediaCardBox {
padding: 27px 20px;
padding: 27px 20px 100px 20px;
// display: flex;
// flex-wrap: wrap;
.mediaCardBoxHeader {
......@@ -261,4 +261,15 @@
// color: red;
// animation: refreshRotate 0.5s linear;
// }
}
.submitBtnBox {
position: fixed;
bottom: 0;
background-color: #fff;
padding: 20px 20px 14px 20px;
width: 100%;
box-shadow:1px -6px 6px 0px rgba(0, 0, 0, 0.04);
transition: 0.2s left;
transition: 0.1s width;
z-index: 20;
}
\ No newline at end of file
......@@ -102,7 +102,7 @@ class ThemeEditor extends React.Component {
});
}
}
});
}, 800);
// this.editor = ue;
that.uEditor.addListener('contentChange', () => {
that.props.uEditorChange(this.uEditor.getContent());
......
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