pageClass | sidebarDepth | title | description | since |
---|---|---|---|---|
rule-details |
0 |
vue/no-root-v-if |
disallow `v-if` directives on root element |
v9.12.0 |
disallow
v-if
directives on root element
This rule reports template roots with v-if
. Rendering of the whole component could be made conditional in the parent component (with a v-if
there) instead.
This rule reports the template root in the following cases:
<template>
<div v-if="foo"></div>
</template>
Nothing.
This rule was introduced in eslint-plugin-vue v9.12.0