热门搜索 :
考研考公
您的当前位置:首页正文

$refs 获取子组件未定义

来源:东饰资讯网

Uncaught TypeError: Cannot read property 'childComponent' of undefined

获取子组件实例:this.$refs.*.childComponent(),如上报错!

解决方式:setTimeOut

setTimeout(()=>{

this.$refs.*.childComponent();

},10)

Top