vue子组件给父组件传值

子组件:


子组件通过this.$emit()的方式将值传递给父组件

注意:这里的func是父组件中绑定的函数名

父组件:


好了,so easy!

你可能感兴趣的:(vue)