Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <template>
- <div @click="updateDetails">Server #{{id}}</div>
- </template>
- <script>
- import eventBus from '../Shared/EventBus';
- export default {
- props: ['id', 'status'],
- created(){
- eventBus.$on('resetServer', (id) => {
- if (id === this.id)
- {
- this.status = 'Normal';
- }
- })
- },
- methods: {
- updateDetails(){
- eventBus.updateDetails(this.id, this.status);
- }
- }
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement