I am looking for a way to easily funnel all the methods to the parent. So that i can wrap a external component to add some extras without losing the api/ without exposing every exposed methode separatly..
Vue version
"vue": "^3.3.4"
Link to minimal reproduction
Steps to reproduce
expose a template ref (with exposed props)
What is expected?
The outer (App.vue) should be able to access the template refs number.
What is actually happening?
he outer (App.vue) is not able to access the template refs number.
System Info
No response
Any additional comments?
I am looking for a way to easily funnel all the methods to the parent. So that i can wrap a external component to add some extras without losing the api/ without exposing every exposed methode separatly..
What should I do !
Bro you need to read a little bit the documentation the behavior that are you looking for is here Provider & Inject
Please keep in the mind that this channel is just for bug relations or things related to the vuejs core development, for another points they recommend to use community channels around the round.
Bro you need to read a little bit the documentation the behavior that are you looking for is here Provider & Inject
Please keep in the mind that this channel is just for bug relations or things related to the vuejs core development, for another points they recommend to use community channels around the round.
You may not understand what I mean
We are facing the same problem but have not provided a solution see to https://github.com/vuejs/core/issues/6540 @lpj145
Bro I get your point and the relation with the #6540 but you need to understand it's a bad design idea, I know you should be able to do this, but this is main reason why the Dependency api was developed, but by the way if you want to continue in this way, every defineExpose
should be called with a plain object with references to the internal component references, it will works, but, you see that it's a bad design idea, the Provider & Inject + Composables will be your best friend right now 😄
the Provider & Inject + Composables
Can you explain it in detail?
My question is how to expose functions of third-party components , There may be many functions of third-party components, what would you do ?
Can you give an example?
@lpj145
That's what I'm doing now:
Components for secondary packaging: virtualized-table.vue
Note: I would not see this as a recommended pattern, but the above should do what you want. We will not add any kind of new API for that.
Note: I would not see this as a recommended pattern, but the above should do what you want. We will not add any kind of new API for that.
I want to obtain the properties and methods exposed by the subcomponents, and then expose them. What should I do Consistent with the document @LinusBorg