JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://unpkg.com/vue"></script>
<div id="myThingsContainer">
<something @custom-event="doThings"></something>
<something @custom-event="doThings"></something>
<something @custom-event="doThings"></something>
</div>
JavaScript
var aThing = Vue.component('something',{
template :` <button class="my-btn" @click="$emit('custom-event','I have no idea who called me')">Click me</button>`});
var live_orders = new Vue({
el : '#myThingsContainer',
components:{
'somthing' : aThing
},
methods:{
doThings(message){
alert(message);
}
}
})