Files
EdgeAdmin/web/public/js/components/common/bytes-var.js
2022-10-03 19:25:20 +08:00

16 lines
329 B
JavaScript

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>`
})