更新任务1

This commit is contained in:
jimmy committed 2025-01-18 22:36:00 +08:00
1 parent a4602ef13c
commit be83143813
2 files changed
+6 -7

No files matched your search

-3
View File
@@ -40,7 +40,6 @@ export class FileUtils {
return segments[segments.length - 1]
}
/**
* 截断指定路径
*/
@@ -58,10 +57,8 @@ export class FileUtils {
* @param n
*/
static getRoleFolderName (url: string,n:number): string {
console.log(url);
url = url.replace(/\\/g, '/')
const segments = url.split('/')
console.log(segments);
if (n > 0) {
return segments.slice(0, n).join('/');
} else if (n < 0) {