vue.js 如何获取某个组件实例
1 回答

慕后森
TA贡献1802条经验 获得超5个赞
如果是在父附件中,可以通过ref
<component1 ref="ref1"></component>
在父组件中 this.$refs.ref1
在子组件中通过 this.$parent获取父组件
添加回答
举报
0/150
提交
取消