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, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/14690121.html
未经授权禁止转载,违者必究!