many update again

This commit is contained in:
LouisLam
2021-06-30 21:04:58 +08:00
parent 9fa84a0a2b
commit 46f07fc17e
9 changed files with 345 additions and 45 deletions

39
src/components/Status.vue Normal file
View File

@@ -0,0 +1,39 @@
<template>
<span class="badge rounded-pill" :class=" 'bg-' + color ">{{ text }}</span>
</template>
<script>
export default {
props: {
status: Number
},
computed: {
color() {
if (this.status === 0) {
return "danger"
} else if (this.status === 1) {
return "primary"
} else {
return "secondary"
}
},
text() {
if (this.status === 0) {
return "Down"
} else if (this.status === 1) {
return "Up"
} else {
return "Unknown"
}
},
}
}
</script>
<style scoped>
span {
width: 45px;
}
</style>