Skip to content

vue/no-use-v-if-with-v-for ​

Move v-if to a wrapper element or use computed to filter the list

PropertyValue
CategoryPerformance
Default Severitywarning
Confidencehigh
FixableNo
Engineeslint-template
Sincev1.0.0
Frameworksvue, nuxt

Why it matters ​

Move v-if to a wrapper element or use computed to filter the list

How to fix ​

Review the finding and update the code according to best practices below.

Agent Guidance ​

Do not put v-if and v-for on the same element. Filter the list in a computed and iterate the result, or move v-if to a wrapping <template>.


Rule source: vue/no-use-v-if-with-v-for

Released under the MIT License.