issue
This commit is contained in:
parent
d51bea4928
commit
1a5f81887a
|
@ -128,7 +128,7 @@ function CoderDepot(props){
|
|||
|
||||
useEffect(()=>{
|
||||
axios.get(`/${owner}/${projectsId}/releases.json`).then((result)=>{
|
||||
if(result && result.data && result.data.releases){
|
||||
if(result && result.data){
|
||||
const release = {
|
||||
"list":result.data.releases,
|
||||
"total_count":result.data.releases.length
|
||||
|
@ -136,7 +136,7 @@ function CoderDepot(props){
|
|||
setReleaseVersions(release);
|
||||
}
|
||||
})
|
||||
},[releaseVersions])
|
||||
},[])
|
||||
|
||||
// 获取主目录列表
|
||||
function getDirInfo(branch){
|
||||
|
|
|
@ -4,7 +4,6 @@ import UserSubmitComponent from "./UserSubmitComponent";
|
|||
|
||||
import "./index.css";
|
||||
import "./editor.css";
|
||||
import { edit } from "marked/src/helpers";
|
||||
|
||||
class m_editor extends Component {
|
||||
constructor(props) {
|
||||
|
@ -76,7 +75,7 @@ class m_editor extends Component {
|
|||
padding;
|
||||
|
||||
if (this.state.prevHeight !== height) {
|
||||
this.serState({
|
||||
this.setState({
|
||||
prevHeight:height
|
||||
})
|
||||
// setPrevHeight(height);
|
||||
|
@ -87,38 +86,34 @@ class m_editor extends Component {
|
|||
};
|
||||
|
||||
return (
|
||||
|
||||
|
||||
<React.Fragment>
|
||||
<div>
|
||||
<div className="">
|
||||
<Editor
|
||||
// height={this.state.x}
|
||||
language={language ? language : "plaintext"}
|
||||
theme={"vs-grey"}
|
||||
placeholder="请输入内容"
|
||||
value={editorValue}
|
||||
options={editor_options}
|
||||
onChange={this.changeEditor}
|
||||
editorWillMount={this.editorWillMount}
|
||||
editorDidMount={handleEditorMount}
|
||||
/>
|
||||
</div>
|
||||
{!readOnly && (
|
||||
<div style={{marginTop:"20px",padding:"20px"}}>
|
||||
<UserSubmitComponent
|
||||
{...this.props}
|
||||
{...this.state}
|
||||
filepath={`${this.props.filepath}`}
|
||||
content={editorValue}
|
||||
editor_type={editorType}
|
||||
currentBranch={currentBranch}
|
||||
descName={descName}
|
||||
></UserSubmitComponent>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</React.Fragment>
|
||||
<div>
|
||||
<div className="">
|
||||
<Editor
|
||||
height="400px"
|
||||
language={language ? language : "plaintext"}
|
||||
theme={"vs-grey"}
|
||||
placeholder="请输入内容"
|
||||
value={editorValue}
|
||||
options={editor_options}
|
||||
onChange={this.changeEditor}
|
||||
editorWillMount={this.editorWillMount}
|
||||
editorDidMount={handleEditorMount}
|
||||
/>
|
||||
</div>
|
||||
{!readOnly && (
|
||||
<div style={{marginTop:"20px",padding:"20px"}}>
|
||||
<UserSubmitComponent
|
||||
{...this.props}
|
||||
{...this.state}
|
||||
filepath={`${this.props.filepath}`}
|
||||
content={editorValue}
|
||||
editor_type={editorType}
|
||||
currentBranch={currentBranch}
|
||||
descName={descName}
|
||||
></UserSubmitComponent>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue