-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Description
Here is a nested v-for
case
<div v-for="x in xs">
<div v-if="calcYs(x).length>0">
<div v-for="y in calcYs(x)"> {{y}} </div>
</div>
<div v-else>fallback content</div>
</su-tab>
where calcYs
is a method. As you can see, for every x
, calcYs(x)
will be called twice (if not empty) which is not necessary. It would be more efficient if we can bind the result of calcYs(x)
to some local variables inside v-for
.
drafterleo, FranckFreiburger, green-coder, Kian-Esmaeilpour, printercu and 20 more
Metadata
Metadata
Assignees
Labels
No labels