Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. <template>
  2. <div @click="updateDetails">Server #{{id}}</div>
  3. </template>
  4.  
  5. <script>
  6. import eventBus from '../Shared/EventBus';
  7. export default {
  8. props: ['id', 'status'],
  9. created(){
  10. eventBus.$on('resetServer', (id) => {
  11. if (id === this.id)
  12. {
  13. this.status = 'Normal';
  14. }
  15. })
  16. },
  17. methods: {
  18. updateDetails(){
  19. eventBus.updateDetails(this.id, this.status);
  20. }
  21. }
  22. }
  23. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement