文件夹、文件名字含有特殊字符

This commit is contained in:
caishi 2022-05-23 17:25:14 +08:00
parent d906b6c391
commit 36e2f03946
4 changed files with 7 additions and 7 deletions

View File

@ -204,7 +204,6 @@ class NewHeader extends Component {
}else{
str = match.path;
}
if (url && (str === url || (str === url+'/'))) {
return true
}else {

View File

@ -192,7 +192,7 @@ function CoderDepot(props){
const url = `/${owner}/${projectsId}/sub_entries.json`;
axios.get(url, {
params:{
filepath:path,
filepath:returnbar(path),
ref:ref || branchName,
type
}
@ -272,8 +272,9 @@ function CoderDepot(props){
if(type!=="submodule"){
let enBranch = branchName || defaultBranch;
let checkvalue = turnbar(enBranch);
let enPath = turnbar(path);
setType(type);
props.history.push(`/${owner}/${projectsId}${`/tree/${checkvalue}`}${path?`/${path}`:""}`);
props.history.push(`/${owner}/${projectsId}${`/tree/${checkvalue}`}${enPath?`/${enPath}`:""}`);
}
}

View File

@ -1,5 +1,5 @@
import { result } from 'lodash';
import React from 'react';
import { returnbar } from 'educoder';
function CoderDepotPath({treeValuePath , returnUlr , returnMain , getPathUrl , identifier}){
@ -17,9 +17,9 @@ function CoderDepotPath({treeValuePath , returnUlr , returnMain , getPathUrl , i
<React.Fragment>
{
key === treeValuePath.length-1 ?
<span className="color-grey-6 subFileName" key={key}>{item}</span>
<span className="color-grey-6 subFileName" key={key}>{returnbar(item)}</span>
:
<a onClick={()=>returnUlr(`${getPathUrl(treeValuePath,key+1)}`)} className="color-blue subFileName">{item}</a>
<a onClick={()=>returnUlr(`${getPathUrl(treeValuePath,key+1)}`)} className="color-blue subFileName">{returnbar(item)}</a>
}
</React.Fragment>
);

View File

@ -512,7 +512,7 @@
top: 0px;
color: #999;
height: 22px;
line-height: 22px;
line-height: 17px;
}
.addFile{
display: flex;