dev_new_shixunsrepository
杨树明 5 years ago
parent eff129d4a8
commit 68a8b44083

@ -73,6 +73,9 @@ const mirrorNameModeMap = {
class RepositoryAddFile extends Component { class RepositoryAddFile extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = {
path:""
}
} }
componentDidMount(){ componentDidMount(){
@ -88,9 +91,12 @@ class RepositoryAddFile extends Component {
newfilspath=newfilspath+'/'+item; newfilspath=newfilspath+'/'+item;
} }
}) })
this.setState({
path:newfilspath
})
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
path:newfilspath, path: newfilspath,
}); });
} }
} }
@ -147,6 +153,14 @@ class RepositoryAddFile extends Component {
} }
}) })
} }
setinput=(e)=>{
this.setState({
path:e.target.value
})
this.props.form.setFieldsValue({
path:e.target.value,
});
}
render(){ render(){
const {getFieldDecorator} = this.props.form; const {getFieldDecorator} = this.props.form;
let { shixunId } = this.props.match.params; let { shixunId } = this.props.match.params;
@ -159,6 +173,7 @@ class RepositoryAddFile extends Component {
if(matchpath.indexOf("secret_repository")>-1){ if(matchpath.indexOf("secret_repository")>-1){
Repositoryflag ="secret_repository"; Repositoryflag ="secret_repository";
} }
return( return(
<div> <div>
<div className="educontent mt30"> <div className="educontent mt30">
@ -237,10 +252,11 @@ class RepositoryAddFile extends Component {
}], }],
})( })(
<span> <span>
<span> </span><span><Input placeholder="文件名称或文件路径" className=" fl" style={{ width: 200 }} size="large"/></span><span className={" ml10 fl"}>提示:输入 / 可以将文件创建到新文件夹下</span> <span> </span><span><Input value={this.state.path} placeholder="文件名称或文件路径" className=" fl" style={{ width: 200 }} size="large" onInput={(e)=>this.setinput(e)}/></span><span className={" ml10 fl"}>提示:输入 / 可以将文件创建到新文件夹下</span>
</span> </span>
)} )}
</Form.Item> </Form.Item>
</div> </div>
<style> <style>

Loading…
Cancel
Save