最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - vue ref on custom child component not working - Stack Overflow

programmeradmin6浏览0评论

I've been googling for hours, reading countless vue docs and relevant posts on stackoverflow without luck.

I need to access an internal property of a ponent, because that ponent is nothing but a wrapper for a vanilla ponent which I need access to in the parent.

I am trying to create a ref which is unique and accessible only inside the parent (App) ponent, and my understanding is that I should do that inside setup method like so: const myRef = ref(null)

But alas, myRef.value is forever null

发布评论

评论列表(0)

  1. 暂无评论