Vue refs 为什么无法获取组件对象

2025-05-09 03:42:14
推荐回答(1个)
回答1:

如果是在父附件中,可以通过ref 在父组件中 this.$refs.ref1 在子组件中通过 this.$parent获取父组件