1***@qq.com
1***@qq.com
  • 发布:2024-09-26 12:49
  • 更新:2024-09-27 11:20
  • 阅读:209

this.$refs.tkitree._show();提示不是个函数

2024-09-26 12:49 负责人:无 分享
已邀请:
BeardYound

BeardYound

先打印this.$refs看下是不是组件还没挂载完成,或者这样写

this.$nextTick( () => {  
                                if ( that.$refs.tkitree) {  
                                    this.$refs.tkitree._show()  
                                }  
                            } )
1***@qq.com

1***@qq.com (作者)

已经解决了,是ref里存在多个,还得分项取

要回复问题请先登录注册