s6e96 last compoent s6
This commit is contained in:
parent
a67e868830
commit
8a52e80050
15
vue-cli/src/Home.vue
Normal file
15
vue-cli/src/Home.vue
Normal file
@ -0,0 +1,15 @@
|
||||
<template>
|
||||
<div><app-server-status v-for="server in 5"></app-server-status></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ServerStatus from './ServerStatus.vue'
|
||||
import AppServerStatus from "./ServerStatus";
|
||||
export default {
|
||||
components: {
|
||||
AppServerStatus,
|
||||
'app-server-status': ServerStatus
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
22
vue-cli/src/ServerStatus.vue
Normal file
22
vue-cli/src/ServerStatus.vue
Normal file
@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<div>
|
||||
<p>Server Status: {{ status }}</p>
|
||||
<hr>
|
||||
<button @click="changeStatus">Change</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data(){
|
||||
return {
|
||||
status: 'critical'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeStatus(){
|
||||
this.status = 'Normal'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user