Merge pull request 'issue代码提交' (#98) from caishi/forgeplus-react:feature_repo_second_page into feature_repo_second_page
This commit is contained in:
commit
4db06a9fd7
|
@ -128,7 +128,7 @@ function CoderDepot(props){
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
axios.get(`/${owner}/${projectsId}/releases.json`).then((result)=>{
|
axios.get(`/${owner}/${projectsId}/releases.json`).then((result)=>{
|
||||||
if(result && result.data && result.data.releases){
|
if(result && result.data){
|
||||||
const release = {
|
const release = {
|
||||||
"list":result.data.releases,
|
"list":result.data.releases,
|
||||||
"total_count":result.data.releases.length
|
"total_count":result.data.releases.length
|
||||||
|
@ -136,7 +136,7 @@ function CoderDepot(props){
|
||||||
setReleaseVersions(release);
|
setReleaseVersions(release);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},[releaseVersions])
|
},[])
|
||||||
|
|
||||||
// 获取主目录列表
|
// 获取主目录列表
|
||||||
function getDirInfo(branch){
|
function getDirInfo(branch){
|
||||||
|
|
|
@ -189,13 +189,13 @@
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
padding-bottom: 2px;
|
padding-bottom: 2px;
|
||||||
a{
|
a{
|
||||||
margin: 0px 17px 0px 0px;
|
margin: 0px 17px 10px 0px;
|
||||||
img{
|
img{
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
}
|
}
|
||||||
&:nth-child(6){
|
&:nth-child(5){
|
||||||
margin-right: 0px;
|
margin-right: 0px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@ import UserSubmitComponent from "./UserSubmitComponent";
|
||||||
|
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
import "./editor.css";
|
import "./editor.css";
|
||||||
import { edit } from "marked/src/helpers";
|
|
||||||
|
|
||||||
class m_editor extends Component {
|
class m_editor extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
@ -76,7 +75,7 @@ class m_editor extends Component {
|
||||||
padding;
|
padding;
|
||||||
|
|
||||||
if (this.state.prevHeight !== height) {
|
if (this.state.prevHeight !== height) {
|
||||||
this.serState({
|
this.setState({
|
||||||
prevHeight:height
|
prevHeight:height
|
||||||
})
|
})
|
||||||
// setPrevHeight(height);
|
// setPrevHeight(height);
|
||||||
|
@ -87,38 +86,34 @@ class m_editor extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<div>
|
||||||
|
<div className="">
|
||||||
<React.Fragment>
|
<Editor
|
||||||
<div>
|
height="400px"
|
||||||
<div className="">
|
language={language ? language : "plaintext"}
|
||||||
<Editor
|
theme={"vs-grey"}
|
||||||
// height={this.state.x}
|
placeholder="请输入内容"
|
||||||
language={language ? language : "plaintext"}
|
value={editorValue}
|
||||||
theme={"vs-grey"}
|
options={editor_options}
|
||||||
placeholder="请输入内容"
|
onChange={this.changeEditor}
|
||||||
value={editorValue}
|
editorWillMount={this.editorWillMount}
|
||||||
options={editor_options}
|
editorDidMount={handleEditorMount}
|
||||||
onChange={this.changeEditor}
|
/>
|
||||||
editorWillMount={this.editorWillMount}
|
</div>
|
||||||
editorDidMount={handleEditorMount}
|
{!readOnly && (
|
||||||
/>
|
<div style={{marginTop:"20px",padding:"20px"}}>
|
||||||
</div>
|
<UserSubmitComponent
|
||||||
{!readOnly && (
|
{...this.props}
|
||||||
<div style={{marginTop:"20px",padding:"20px"}}>
|
{...this.state}
|
||||||
<UserSubmitComponent
|
filepath={`${this.props.filepath}`}
|
||||||
{...this.props}
|
content={editorValue}
|
||||||
{...this.state}
|
editor_type={editorType}
|
||||||
filepath={`${this.props.filepath}`}
|
currentBranch={currentBranch}
|
||||||
content={editorValue}
|
descName={descName}
|
||||||
editor_type={editorType}
|
></UserSubmitComponent>
|
||||||
currentBranch={currentBranch}
|
</div>
|
||||||
descName={descName}
|
)}
|
||||||
></UserSubmitComponent>
|
</div>
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</React.Fragment>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue