person
(匿名) #ee341e2c
2021-03-19に投稿

・$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)); } } });
コメント