fix:下载中心容量显示

This commit is contained in:
wyx
2023-01-19 09:35:33 +08:00
parent d17d64c1d4
commit 0e29925e2f

View File

@@ -59,7 +59,7 @@
'0%': countCMB>2?'#FF0000 ':'#45B058',
'100%': countCMB>2?'#FF0000 ':'#45B058',
}" />
<div v-if="countCMB>2" style="color:rgba(255, 116, 116, 1);font-size:12px;">容量已满,请删除文件</div>
<div v-if="formatCapacityGB(capacity)>2" style="color:rgba(255, 116, 116, 1);font-size:12px;">容量已满,请删除文件</div>
</div>
</div>
<!-- 文件容器 -->
@@ -176,6 +176,12 @@ export default {
return CMB
}
function formatCapacityGB(data) {
let num = Number(data);
let CMB = (num / (1048576*1024)).toFixed(2);
return CMB
}
// 下载文件
function downLoadFile(data) {
console.log(data)
@@ -226,7 +232,8 @@ export default {
changePaginationStu,
searchDownloadList,
reseatDownloadList,
formatCapacity
formatCapacity,
formatCapacityGB
};
},
};