From d896ead64cb30560247908de65cab84b40f6cc91 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Wed, 26 Jun 2019 09:50:38 +0800 Subject: [PATCH] mdInForm --- .../src/modules/courses/boards/BoardsNew.js | 2 +- .../courses/busyWork/CommonWorkList.js | 2 ++ .../src/modules/courses/busyWork/NewWork.js | 28 +++++++++++++------ .../react/src/modules/courses/css/Courses.css | 8 +++++- 4 files changed, 30 insertions(+), 10 deletions(-) diff --git a/public/react/src/modules/courses/boards/BoardsNew.js b/public/react/src/modules/courses/boards/BoardsNew.js index 97d9436a6..718b6de42 100644 --- a/public/react/src/modules/courses/boards/BoardsNew.js +++ b/public/react/src/modules/courses/boards/BoardsNew.js @@ -316,7 +316,7 @@ class BoardsNew extends Component{ max: 60, message: '最大限制为60个字符', }], })( - + )} diff --git a/public/react/src/modules/courses/busyWork/CommonWorkList.js b/public/react/src/modules/courses/busyWork/CommonWorkList.js index 246c9d544..25ddaa146 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkList.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkList.js @@ -371,6 +371,8 @@ class CommonWorkSetting extends Component{ componentDidMount() { this.fetchList() on('commonwork_fetch_all', this.fetchAllListener) + $("html").animate({ scrollTop: $('html').scrollTop() - 100 }) + } componentWillUnmount() { off('commonwork_fetch_all', this.fetchAllListener) diff --git a/public/react/src/modules/courses/busyWork/NewWork.js b/public/react/src/modules/courses/busyWork/NewWork.js index eefbc1f0b..a6fc93c92 100644 --- a/public/react/src/modules/courses/busyWork/NewWork.js +++ b/public/react/src/modules/courses/busyWork/NewWork.js @@ -417,12 +417,25 @@ class NewWork extends Component{ height: 40px; line-height: 40px; } + + .workContent.AboutInputForm.ant-form-item { + border-bottom: none; + padding-bottom: 0px !important; + } + .newWorkUpload { + padding: 0px 30px 30px 30px!important; + background: #fff; + width: 100%; + display: inline-block; + border-bottom: 1px solid #EDEDED; + } + `} { {getFieldDecorator('description', { rules: [{ @@ -432,14 +445,13 @@ class NewWork extends Component{ )} - - - - (单个文件150M以内) - } + + + (单个文件150M以内) + { isGroup && diff --git a/public/react/src/modules/courses/css/Courses.css b/public/react/src/modules/courses/css/Courses.css index 8720dd860..eb674a397 100644 --- a/public/react/src/modules/courses/css/Courses.css +++ b/public/react/src/modules/courses/css/Courses.css @@ -916,7 +916,7 @@ a.white-btn.use_scope-btn:hover{ .ml22{ margin-left:22px; } - +/* FORM START */ .ant-form label{ /* 为了覆盖antd的样式,这里使用了important,TODO */ font-size: 16px !important; @@ -930,6 +930,12 @@ a.white-btn.use_scope-btn:hover{ .ant-form label.font-12 { font-size: 12px !important; } +/* md编辑器在form中时,使用这个样式,可以把错误信息绝对定位 */ +.mdInForm .has-error .ant-form-explain { + position: absolute; + margin-top: -2px; + margin-left: -7px; +} /*新建课堂*/