🔨 文件下载.

This commit is contained in:
lijiahangmax
2024-02-23 00:47:52 +08:00
parent 3d38246c25
commit c19680b213
30 changed files with 686 additions and 224 deletions

View File

@@ -57,6 +57,14 @@ export function getPath(path: string) {
.replace(new RegExp('/+', 'g'), '/');
}
/**
* 获取文件名
*/
export function getFileName(path: string) {
path = getPath(path);
return path.substring(path.lastIndexOf('/') + 1);
}
/**
* 获取父级路径
*/