mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-10 00:23:13 +08:00
many update again
This commit is contained in:
39
src/components/Status.vue
Normal file
39
src/components/Status.vue
Normal 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>
|
Reference in New Issue
Block a user