From ab88d8d83ab310b04a7a310f8851a4bb9871d346 Mon Sep 17 00:00:00 2001 From: tangjiang <465264938@qq.com> Date: Fri, 6 Dec 2019 11:19:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DTPI=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/developer/DeveloperHome.js | 1 - public/react/src/modules/developer/index.js | 3 ++- .../developer/newOrEditTask/leftpane/editorTab/index.js | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/developer/DeveloperHome.js b/public/react/src/modules/developer/DeveloperHome.js index 0ba8bf0c9..1816ccbc7 100644 --- a/public/react/src/modules/developer/DeveloperHome.js +++ b/public/react/src/modules/developer/DeveloperHome.js @@ -179,7 +179,6 @@ class DeveloperHome extends React.PureComponent { componentDidMount() { // 是否是我的,如果是我的 显示编辑按钮 const { isMySource } = this.props; - console.log(this.props); if (isMySource) { this.handleFilterSearch({come_from: 'mine'}); diff --git a/public/react/src/modules/developer/index.js b/public/react/src/modules/developer/index.js index 54bce6695..fb64b3f67 100644 --- a/public/react/src/modules/developer/index.js +++ b/public/react/src/modules/developer/index.js @@ -7,6 +7,7 @@ */ import React from 'react'; import { TPMIndexHOC } from '../tpm/TPMIndexHOC'; +import { SnackbarHOC } from 'educoder'; import DeveloperHome from './DeveloperHome'; const App = (props) => { @@ -15,4 +16,4 @@ const App = (props) => { ); } -export default TPMIndexHOC(App); +export default SnackbarHOC()(TPMIndexHOC(App)); diff --git a/public/react/src/modules/developer/newOrEditTask/leftpane/editorTab/index.js b/public/react/src/modules/developer/newOrEditTask/leftpane/editorTab/index.js index 804df70fb..f13c53b22 100644 --- a/public/react/src/modules/developer/newOrEditTask/leftpane/editorTab/index.js +++ b/public/react/src/modules/developer/newOrEditTask/leftpane/editorTab/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-20 10:35:40 * @LastEditors: tangjiang - * @LastEditTime: 2019-12-04 19:56:43 + * @LastEditTime: 2019-12-05 18:07:32 */ import 'quill/dist/quill.core.css'; import 'quill/dist/quill.bubble.css'; @@ -18,6 +18,7 @@ import AddTestDemo from './AddTestDemo'; import QuillEditor from '../../../quillEditor'; import actions from '../../../../../redux/actions'; import CONST from '../../../../../constants'; +import { fromStore, toStore } from 'educoder'; // 保存和读取store值 const scrollIntoView = require('scroll-into-view'); const {jcLabel} = CONST; const FormItem = Form.Item; @@ -110,6 +111,8 @@ class EditTab extends React.Component { // 改变描述信息 handleChangeDescription = (value) => { // console.log('获取的编辑器内容为: ', value); + // 描述信息变化时,将信息保存至store中 + toStore('oj_description', value); this.props.validateOjDescription(value); } // 改变难易度