mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 03:58:33 +08:00
fix(测试跟踪): 附件1440分辨率显示问题
This commit is contained in:
parent
ac7428edc0
commit
4b153d57af
@ -296,18 +296,18 @@ export function handleCtrlSEvent(event, func) {
|
||||
|
||||
export function byteToSize(bytes) {
|
||||
if (bytes === 0) {
|
||||
return "0 B";
|
||||
return "0B";
|
||||
}
|
||||
let k = 1024,
|
||||
sizeUnits = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"],
|
||||
sizeUnits = ["B", "K", "M", "G", "T", "P", "E", "Z", "Y"],
|
||||
i = Math.floor(Math.log(bytes) / Math.log(k));
|
||||
|
||||
return Math.round(bytes / Math.pow(1024, i)).toFixed(1) + " " + sizeUnits[i];
|
||||
return Math.round(bytes / Math.pow(1024, i)).toFixed(1) + sizeUnits[i];
|
||||
}
|
||||
|
||||
export function sizeToByte(size) {
|
||||
let k = 1024,
|
||||
sizeUnits = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
|
||||
sizeUnits = ["B", "K", "M", "G", "T", "P", "E", "Z", "Y"];
|
||||
let i = 1;
|
||||
for (i++; i < sizeUnits.length;) {
|
||||
let unit = sizeUnits[i];
|
||||
|
@ -163,7 +163,7 @@ export default {
|
||||
computed: {
|
||||
uploadSize() {
|
||||
if (this.fileItem.progress === 0) {
|
||||
return '0 B'
|
||||
return '0B'
|
||||
}
|
||||
if (this.fileItem.progress === 100) {
|
||||
return this.fileItem.size;
|
||||
@ -363,7 +363,7 @@ export default {
|
||||
margin-top: px2rem(11.5);
|
||||
margin-left: px2rem(12.67);
|
||||
width: px2rem(37);
|
||||
margin-right: px2rem(14.67);
|
||||
margin-right: px2rem(8);
|
||||
img {
|
||||
width: 100%;
|
||||
/* height: 100%; */
|
||||
@ -405,7 +405,7 @@ export default {
|
||||
}
|
||||
.file-info-row {
|
||||
display: flex;
|
||||
font-size: 12px;
|
||||
font-size: px2rem(12);
|
||||
line-height: px2rem(20);
|
||||
height: px2rem(20);
|
||||
color: #8f959e;
|
||||
@ -445,7 +445,7 @@ export default {
|
||||
}
|
||||
|
||||
.opt-item {
|
||||
margin-right: 20px;
|
||||
margin-right: px2rem(14);
|
||||
cursor: pointer;
|
||||
}
|
||||
.download {
|
||||
|
Loading…
Reference in New Issue
Block a user