- emit方式调用父组件的方法
- 还可以用$parent.list(1)
//1 父组件
<editcomponent ref="edit" @toList="list(1)" ></editcomponent>
自定义事件, 事件名为toList
//2 子组件
self.$emit('toList');//向父组件emit toList事件
//1 父组件
<editcomponent ref="edit" @toList="list(1)" ></editcomponent>
自定义事件, 事件名为toList
//2 子组件
self.$emit('toList');//向父组件emit toList事件
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。