Can I refer to the other prop inside a prop? #143
-
Can I do something like this using Volar, and get the auto-completion and type checking support?
|
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 12 replies
This comment has been hidden.
This comment has been hidden.
-
Also has a type-only way, it should be support reuse the child component. A challenge is how to define
|
Beta Was this translation helpful? Give feedback.
-
Hello again! I found myself using new script setup sugar (which is still an rfc, I know) a lot, and I was wondering if I can get the same type checking and autocomplete using script setup syntax? Even with some hacks? |
Beta Was this translation helpful? Give feedback.
-
Good day, Johnson! ! It's me again! (haha) This approach works really well with props, but I lost all my slot's types. Can I fix this somehow? And also include generics inside them? Or is this a Volar specific feature and there is nothing I can do? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Generic functional component already supported in v0.25.2.
|
Beta Was this translation helpful? Give feedback.
-
Thanks for the help.
|
Beta Was this translation helpful? Give feedback.
Also has a type-only way, it should be support reuse the child component. A challenge is how to define
DefineComponent<...>
correctly.