Vue.jsに関する質問を何でもしていい掲示板です。匿名での投稿も可能です。どんなことでもどしどし書き込んでください。回答もどなたでも自由にできます。僕も回答できる内容であれば必ず回答します!
質問は下記に沿って書いていただくと回答しやすくなります。
・$emitの前についているthisは何を表しているのでしょうか?
<my-input step="1"></my-input>
Vue.js
Vue.component('my-input', {
props:["step"],
template:`<button type="button" @click="onclick">{{ step }} </button>
`,
methods: {
onclick:function() {
this.$emit('plus', Number(his.step));
}
}
});