Merge pull request 'issue代码提交' (#98) from caishi/forgeplus-react:feature_repo_second_page into feature_repo_second_page

This commit is contained in:
jasder 2021-09-30 16:55:59 +08:00
commit 4db06a9fd7
3 changed files with 33 additions and 38 deletions

View File

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

View File

@ -189,13 +189,13 @@
flex-wrap: wrap;
padding-bottom: 2px;
a{
margin: 0px 17px 0px 0px;
margin: 0px 17px 10px 0px;
img{
border-radius: 50%;
width: 40px;
height: 40px;
}
&:nth-child(6){
&:nth-child(5){
margin-right: 0px;
}
}

View File

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