refactor: Folder size

This commit is contained in:
somnetsak123 2023-12-13 14:49:27 +07:00
parent 73673f7ae3
commit 7b13566757
2 changed files with 53 additions and 5 deletions

View file

@ -13,6 +13,7 @@ type Path = string
export interface StorageFolder {
pathname: string
name: string
folderSize?: string
createdAt: string
createdBy: string
}
@ -58,6 +59,7 @@ function constructUrl(path: string | string[], append = true) {
return a
}
}, '')
return append
? url + ['cabinet', '/drawer', '/folder', '/subfolder'][arr.length]
: url
@ -461,6 +463,8 @@ const useStorage = defineStore('storageStore', () => {
createFile,
updateFile,
deleteFile,
constructUrl,
consistantPath,
}
})