mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-03 12:20:28 +08:00
15 lines
461 B
JavaScript
15 lines
461 B
JavaScript
Vue.component("bandwidth-size-capacity-view", {
|
|
props: ["v-value"],
|
|
data: function () {
|
|
let capacity = this.vValue
|
|
if (capacity != null && capacity.count > 0 && typeof capacity.unit === "string") {
|
|
capacity.unit = capacity.unit[0].toUpperCase() + capacity.unit.substring(1) + "ps"
|
|
}
|
|
return {
|
|
capacity: capacity
|
|
}
|
|
},
|
|
template: `<span>
|
|
<span v-if="capacity != null && capacity.count > 0">{{capacity.count}}{{capacity.unit}}</span>
|
|
</span>`
|
|
}) |