增加带宽相关组件

This commit is contained in:
刘祥超
2024-01-11 15:17:52 +08:00
parent 45d36dadcb
commit 10d606a101
2 changed files with 94 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
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>`
})