-
-
Save crazyones110/a00f0c85bca79c0badfc16f56e61acb2 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
<template> | |
<div> | |
还剩{{balance}} | |
<button @click="handleClick">我要花我爷爷给我的钱</button> | |
</div> | |
</template> | |
<script> | |
export default { | |
inject: ['eventBus'], | |
props: ['balance'], | |
methods: { | |
handleClick() { | |
this.eventBus.$emit('我想花钱', 100) | |
} | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment