this.$refs 为undefined
问题一:页面初始化使用this.$refs 为undefined
在updated(){},中使用
问题二:
页面使用el-dialog,this.$refs.handlingChild为undefined,
必须要打开dialog页面才能获取到
问题三:
页面使用v-if,this.$refs.handlingChild为undefined,使用this.$nextTick也无效
将v-if改为v-show
链接:(33条消息) Vue中在mounted中通过this.$refs但是获取不到属性的几种常见情况分析_vue组件在mounted里面this.refs_林间有风H的博客-CSDN博客