Merge branch 'newVersion_forge' into dev_devOps

This commit is contained in:
caishi 2020-09-29 11:21:13 +08:00
commit f3d6e8c6dc
2 changed files with 4 additions and 8 deletions

View File

@ -107,13 +107,8 @@ class CoderRootFileDetail extends Component {
EditFile = (flag) => {
const { onEdit } = this.props;
onEdit && onEdit(flag);
// this.setState({
// readOnly: false,
// });
};
// 编辑文件
changeMmirror = (e, e1, value) => {
this.setState({
value,

View File

@ -1,6 +1,5 @@
import React, { Component } from "react";
import Editor from "react-monaco-editor";
import UserSubmitComponent from "./UserSubmitComponent";
import "./index.css";
@ -29,6 +28,7 @@ class m_editor extends Component {
lineHeight: 24,
renderLineHighlight: "line",
revealHorizontalRightPadding: 5,
placeholder:"请输入内容",
readOnly: readOnly,
cursorStyle: readOnly ? "underline-thin" : "line",
folding: true,
@ -46,16 +46,17 @@ class m_editor extends Component {
<div>
<div className="branchTable">
<Editor
height="600px"
height="400px"
language={language ? language : "plaintext"}
theme={"vs-grey"}
defaultValue="请输入内容"
placeholder="请输入内容"
value={editorValue}
options={editor_options}
onChange={this.changeEditor}
editorWillMount={this.editorWillMount}
/>
</div>
{!readOnly && (
<UserSubmitComponent
{...this.props}