更新任务5

This commit is contained in:
jimmy committed 2025-01-18 23:02:22 +08:00
1 parent 4e3361df39
commit b8697c4ce8
2 files changed
+3 -12

No files matched your search

+2
View File
@@ -15,6 +15,7 @@ export class FileUtils {
* @param url
*/
static getFileName (url: string) {
console.log(url,"文件名称");
const parsedUrl = new URL(url)
let pathname = parsedUrl.pathname
pathname = pathname.replace(/\\/g, '/')
@@ -27,6 +28,7 @@ export class FileUtils {
* @param url
*/
static getLastFolderName (url: string): string {
console.log(url,"文件夹名称");
const parsedUrl = new URL(url)
let pathname = parsedUrl.pathname
// 统一路径分隔符为 '/'