🔨 文件下载.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取父级路径
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user