Answer the question
In order to leave comments, you need to log in
How to pass a prop depending on a condition?
There is a component <component></component>
Depending on the condition, I need to have two
<component left></component>
<component right></component>
options <component :dir="getDir()"></component>
: it is necessary that the name of the props change
And it does not suit me
<component v-if="left" left></component>
<component v-else right></component>
because there is a lot of code inside the component plus recursive code, and then it will have to be taken out additionally. Question: is there such a possibility?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question