vue.js 如何獲取某個組件實例
1 回答

守候你守候我
TA貢獻1802條經(jīng)驗 獲得超10個贊
如果是在父附件中,可以通過ref
<component1 ref="ref1"></component>
在父組件中 this.$refs.ref1
在子組件中通過 this.$parent獲取父組件
添加回答
舉報
0/150
提交
取消