This commit is contained in:
jxxghp
2023-07-23 11:38:18 +08:00
parent e3d09cd62d
commit 9dabed99a4
3 changed files with 32 additions and 3 deletions

View File

@@ -20,7 +20,7 @@ const used = ref(0)
// 计算已使用存储空间百分比精确到小数点后1位
const usedPercent = computed(() => {
return Math.round((used.value / storage.value) * 1000) / 10
return Math.round((used.value / (storage.value || 1)) * 1000) / 10
})
// 调用API查询存储空间