const app = Vue.createApp({ data() { return { } }, methods: { }, }); // A component template app.component('name-of-component', { props: [], template: ` `, mounted() { // var self = this; // function to emit // self.$emit('funciton-of-emit', value); }, emits: [], }); app.mount('#game');
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter