goblakepath

dev_cs
hjm 6 years ago
parent c11d30a4f4
commit ebd05488d1

@ -37,7 +37,7 @@ function RepositoryChooseModal(props) {
const path = item || key ? newPathArray[newPathArray.length - 1] : '' const path = item || key ? newPathArray[newPathArray.length - 1] : ''
let id = this.props.match.params.shixunId; let id = props.match.params.shixunId;
let url ="/shixuns/"+id+"/repository.json"; let url ="/shixuns/"+id+"/repository.json";
axios.post(url,{ axios.post(url,{
path: path path: path
@ -55,7 +55,8 @@ function RepositoryChooseModal(props) {
}); });
} }
const savegetfilepath=(value)=>{ const savegetfilepath=(value)=>{
let {selectpath,saveshixunfilepath,pathtype} = this.state const state = {}
let {selectpath,saveshixunfilepath,pathtype} = state
if(pathtype===1){ if(pathtype===1){
let newselectpath; let newselectpath;
@ -78,18 +79,19 @@ function RepositoryChooseModal(props) {
newselectpath=selectpath newselectpath=selectpath
} }
} }
this.setState({ // this.setState({
// selectpatharr:newarr, // // selectpatharr:newarr,
selectpath: newselectpath, // selectpath: newselectpath,
}) // })
} }
const goblakepath=(path,key)=>{
}
const goblakepath=(path,key)=>{
}
} }
function sendgetfilepath() { function sendgetfilepath() {
} }
return ( return (
<Modal <Modal
@ -106,7 +108,7 @@ function RepositoryChooseModal(props) {
{ {
pathArray.length===0?"":pathArray.map((item,key)=>{ pathArray.length===0?"":pathArray.map((item,key)=>{
return( return(
// <a className="f14 fb" onClick={()=>goblakepath(item.path,key,item)}>{item.val}</a> <a className="f14 fb" onClick={()=>goblakepath(item.path,key,item)}>{item.val}</a>
) )
}) })
} }
@ -133,7 +135,7 @@ function RepositoryChooseModal(props) {
<label className="fl mt5 directory_filepath">选中的文件路径</label> <label className="fl mt5 directory_filepath">选中的文件路径</label>
<Input id="points_tusi" placeholder="选中的文件路径" className="fl input-60-40" <Input id="points_tusi" placeholder="选中的文件路径" className="fl input-60-40"
style={{width:"400px"}} style={{width:"400px"}}
onInput={(e)=>this.saveselectpath(e)} onInput={(e)=>saveselectpath(e)}
value={path}/> value={path}/>
</div> </div>

Loading…
Cancel
Save