SHARE
TWEET

Untitled

a guest Jun 20th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top