子组件
<button @click='increment()'>点击</button>
increment:function(){
this.mycontent=10;
alert(this.mycontent);
this.$emit("increment",this.mycontent);
}
父组件
<can-edit-table
refs="table4"
v-model="editInlineAndCellData"
@increment = "demo"
:editIncell="true"
:columns-list="editInlineAndCellColumn"
></can-edit-table>
methods: {
demo(){
alert("尼玛你说行不行");
}
}
即可实现同事我们还可以携带参数