|
|
|
@ -137,7 +137,7 @@ class TPMRepositoryComponent extends Component {
|
|
|
|
|
return this.nameTypeMap[array[array.length - 1]] !== 'tree' && this._isFileName( array[array.length - 1] )
|
|
|
|
|
}
|
|
|
|
|
// listItem 如果是num,则是通过面包屑点击过来的,取pathArray的子集
|
|
|
|
|
fetchRepo = (listItem) => {
|
|
|
|
|
fetchRepo = (listItem,type) => {
|
|
|
|
|
// if(listItem === "main"||listItem){
|
|
|
|
|
// this.props.history.replace(`/shixuns/${this.props.match.params.shixunId}/repository`)
|
|
|
|
|
// return;
|
|
|
|
@ -180,7 +180,7 @@ class TPMRepositoryComponent extends Component {
|
|
|
|
|
this.props.setpathArray(newPathArray)
|
|
|
|
|
let urlNewPathArray = newPathArray;
|
|
|
|
|
let fileInPathArray = false;
|
|
|
|
|
if (newPathArray.length) {
|
|
|
|
|
if (newPathArray.length&&!type) {
|
|
|
|
|
fileInPathArray = this.nameTypeMap[newPathArray[newPathArray.length - 1]] ? this.nameTypeMap[newPathArray[newPathArray.length - 1]] !== 'tree'
|
|
|
|
|
: (listItem ? listItem.type !== 'tree' : this._isFileName( newPathArray[newPathArray.length - 1] ))
|
|
|
|
|
|
|
|
|
@ -237,7 +237,7 @@ class TPMRepositoryComponent extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
oncodechanner=(sum)=>{
|
|
|
|
|
this.fetchRepo(sum)
|
|
|
|
|
this.fetchRepo(sum,true)
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
const { listItemtypes } = this.state;
|
|
|
|
|