【发布时间】:2017-12-22 00:07:51
【问题描述】:
当我们需要自定义组件在VueTable2 中发出事件时,我们必须使用:
this.$parent.$emit('myCustomEvent')
// instead of
this.$emit('myCustomEvent')
This thread 告诉我们更多关于这方面的信息。
当我不得不触发一个事件时,我曾经运行this.$emit()。我想知道他们两个之间的主要区别是什么?
【问题讨论】:
标签: vue.js vuejs2 vue-component