Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
<div id="app">
v-on:hello-hoge="msg = 'OK!!!'"
v-on:helloHoge="msg = 'OK???'"
<script type="text/x-template" id="custom-component">
<button v-on:click="$emit('hello-hoge')">これはOK!</button>
<button v-on:click="$emit('helloHoge')">これはだめ!</button>
<script src=""></script>
Vue.component("customComponent", {
props: ["msg"],
template: "#custom-component",
new Vue({
el: "#app",
data: {
msg: 'hoge'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.