|
|
|
@ -4,7 +4,7 @@
|
|
|
|
|
* @Github:
|
|
|
|
|
* @Date: 2019-11-27 14:59:51
|
|
|
|
|
* @LastEditors : tangjiang
|
|
|
|
|
* @LastEditTime : 2019-12-27 19:23:46
|
|
|
|
|
* @LastEditTime : 2020-01-02 14:23:43
|
|
|
|
|
*/
|
|
|
|
|
import React, { useState, useEffect } from 'react';
|
|
|
|
|
import {connect} from 'react-redux';
|
|
|
|
@ -39,7 +39,7 @@ const RightPane = (props) => {
|
|
|
|
|
changeLoadingState
|
|
|
|
|
} = props;
|
|
|
|
|
|
|
|
|
|
const [editorCode, setEditorCode] = useState(editor_code || hack.code);
|
|
|
|
|
// const [editorCode, setEditorCode] = useState(editor_code || hack.code);
|
|
|
|
|
const [noteClazz, setNoteClazz] = useState('editor_nodte_area');
|
|
|
|
|
const [noteCount] = useState(5000);
|
|
|
|
|
// const [code, setCode] = useState(editor_code || hack.code);
|
|
|
|
@ -65,8 +65,9 @@ const RightPane = (props) => {
|
|
|
|
|
let timer = null; // 定时器
|
|
|
|
|
// 代码块内容变化时
|
|
|
|
|
const handleCodeChange = (value) => {
|
|
|
|
|
// console.log('编辑器代码 ======》》》》》》》》》++++++++++', value);
|
|
|
|
|
saveUserInputCode(value);
|
|
|
|
|
setEditorCode(value);
|
|
|
|
|
// setEditorCode(value);
|
|
|
|
|
if (!timer) {
|
|
|
|
|
timer = setInterval(function () {
|
|
|
|
|
clearInterval(timer);
|
|
|
|
@ -116,6 +117,7 @@ const RightPane = (props) => {
|
|
|
|
|
const { getFieldDecorator } = props.form;
|
|
|
|
|
return (
|
|
|
|
|
<div className={'right_pane_code_wrap'}>
|
|
|
|
|
|
|
|
|
|
<MyMonacoEditor
|
|
|
|
|
notice={notice}
|
|
|
|
|
identifier={identifier}
|
|
|
|
|