hjm 5 years ago
parent 8fd076eec5
commit c09054de5e

@ -38,6 +38,7 @@ class TPMRepositoryComponent extends Component {
componentDidMount = () => {
this.nameTypeMap = {}
this.fetchRepo()
}
setContentWidth100 = (flag) => {
@ -117,7 +118,7 @@ class TPMRepositoryComponent extends Component {
if (listItem === 0 || listItem) {
this.setContentWidth100(false)
this.nameTypeMap[listItem.name] = listItem.type
if (typeof listItem == 'number') { // 参数是数字的话,做截取
// if (this._isFileName(newPathArray[listItem])) { // 面包屑中的文件不让点击了
// listItem--;
@ -195,6 +196,7 @@ class TPMRepositoryComponent extends Component {
{ !isContentWidth100 ? <TPMRepository
{...this.props}
{...this.state}
nameTypeMap={this.nameTypeMap}
fetchRepo={this.fetchRepo}
>
</TPMRepository>
@ -208,7 +210,7 @@ class TPMRepositoryComponent extends Component {
{...this.props}
fetchRepo={this.fetchRepo}
saveCode={this.saveCode}
nameTypeMap={this.nameTypeMap}
></RepositoryCodeEditor>
</div>

@ -42,7 +42,7 @@ class RepositoryDirectories extends Component {
// /shixuns/3ozvy5f8/repository/3ozvy5f8/master/shixun_show/src
return (
<React.Fragment>
{ item.indexOf('.') === -1
{ this.props.nameTypeMap[item] === 'tree' || item.indexOf('.') === -1
? <a
onClick={() => fetchRepo(index + 1)}
className="color-blue">

Loading…
Cancel
Save