Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_daiao
杨树林 5 years ago
commit 2608400f78

@ -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'});

@ -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));

@ -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);
}
// 改变难易度

@ -47,7 +47,7 @@ const five_min = 5 * 60 * 1000;
倒计时为0时出现重启按钮
*/
const isSSHInIframe = false;
class WebSSHTimer extends React.PureComponent {
class WebSSHTimer extends Component {
constructor(props) {
super(props)
@ -165,7 +165,6 @@ class WebSSHTimer extends React.PureComponent {
})
}
componentDidUpdate(prevProps, prevState, snapshot) {
console.log('======',prevProps, this.state, this.startTimeRemain);
// 仅初始化一次
if (prevProps.showTimerProp === false && this.props.showTimerProp === true) {
if (this.intervalHandler) {
@ -199,8 +198,8 @@ class WebSSHTimer extends React.PureComponent {
// }
} else if (e.data.tp === "sshWorking") {
this.startTimeRemain = 60;
this.forceUpdate()
// this.startTimeRemain = 60;
// this.forceUpdate();
}
});
// } else {

@ -244,8 +244,10 @@ class TPIMonaco extends Component {
// 重要setState(因获取代码、重置代码等接口引起的调用)调用引起的变化才需要setValue
editor_monaco.setValue(this.props.repositoryCode)
}
// 代码没变也需要layout可能从命令行自动切回了代码tab
// 代码没变也需要layout可能从命令行自动切回了代码tab
editor_monaco.layout();
// Clears the editor's undo history.
// TODO
// extend_editor.clearHistory()

Loading…
Cancel
Save