xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

vue 如何在父组件调用子组件中的方法 All In One

vue 如何在父组件调用子组件中的方法 All In One

refs

this.$.refs.child.childFunction();

// 事件方式: $emit 和 $on

const EventBus = new Vue();

EventBus.$emit(事件名, 数据);

EventBus.$on(事件名, data => {});

https://www.cnblogs.com/xgqfrms/p/12307870.html



refs



©xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2021-04-22 16:06  xgqfrms  阅读(99)  评论(4编辑  收藏  举报