Merge branch 'forge' of http://bdgit.educoder.net/Hjqreturn/educoder into forge
commit
bfb58c72b9
@ -0,0 +1,52 @@
|
||||
import React , { Component } from "react";
|
||||
import Editor from "react-monaco-editor";
|
||||
|
||||
import { Input } from 'antd';
|
||||
import './index.css';
|
||||
|
||||
class Index extends Component{
|
||||
constructor(props){
|
||||
super(props);
|
||||
this.state={
|
||||
editorValue:""
|
||||
}
|
||||
}
|
||||
// 取消,弹框询问
|
||||
CancelAddFile=()=>{
|
||||
|
||||
}
|
||||
|
||||
changeEditor=(editorValue)=>{
|
||||
this.setState({
|
||||
editorValue
|
||||
})
|
||||
}
|
||||
|
||||
render(){
|
||||
const { editorValue } = this.state;
|
||||
const { projectDetail } = this.props;
|
||||
return(
|
||||
<div className="main">
|
||||
<div className="f-wrap-alignCenter">
|
||||
<div className="setInputAddon">
|
||||
<Input addonBefore={`/${projectDetail && projectDetail.identifier}/`} placeholder="命名文件..."/>
|
||||
</div>
|
||||
<a onClick={this.CancelAddFile} className="color-blue">取消</a>
|
||||
</div>
|
||||
<div className="branchTable">
|
||||
<p className="branchTitle">新建文件</p>
|
||||
<Editor
|
||||
height="320px"
|
||||
theme={"vs-dark"}
|
||||
value={editorValue}
|
||||
onChange={this.changeEditor}
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
export default Index;
|
@ -0,0 +1,17 @@
|
||||
.setInputAddon{
|
||||
width: 350px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.setInputAddon .ant-input-group-addon{
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
border-left: 1px solid #d9d9d9!important;
|
||||
border-right: none!important;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 400px){
|
||||
.setInputAddon{
|
||||
width: 100%;
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
Loading…
Reference in new issue