Last active
June 5, 2018 11:53
-
-
Save mfaridzia/62b2296a22e35da24b6a1f45af771cb2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// File: ChangeValue.vue | |
<template> | |
<div> | |
{{ datvalue }} | |
</div> | |
</template> | |
<script> | |
import { EventBus } from '@/eventBus.js' | |
export default { | |
data() { | |
return { | |
datvalue: 0 | |
} | |
}, | |
created () { | |
EventBus.$on('changeValue', (val) => { | |
this.datvalue = val | |
console.log('triggered') | |
}) | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment