服务列表页带宽使用比特代替字节

This commit is contained in:
刘祥超
2022-10-03 19:25:20 +08:00
parent f384d86014
commit 3695082ec2
15 changed files with 161 additions and 184 deletions

View File

@@ -0,0 +1,16 @@
Vue.component("bytes-var", {
props: ["v-bytes"],
data: function () {
let bytes = this.vBytes
if (typeof bytes != "number") {
bytes = 0
}
let format = teaweb.splitFormat(teaweb.formatBytes(bytes))
return {
format: format
}
},
template:`<var class="normal">
<span>{{format[0]}}</span>{{format[1]}}
</var>`
})