Appearance
vue/require-toggle-inside-transition
要求控制
<transition>
内内容的显示
- ⚙️ 此规则包含在
"plugin:vue/essential"
、*.configs["flat/essential"]
、"plugin:vue/strongly-recommended"
、*.configs["flat/strongly-recommended"]
、"plugin:vue/recommended"
和*.configs["flat/recommended"]
中。
📖 规则详情
此规则报告 <transition>
中不控制显示的元素。
¥This rule reports elements inside <transition>
that do not control the display.
🔧选项
¥🔧 Options
json
{
"vue/require-toggle-inside-transition": ["error", {
"additionalDirectives": []
}]
}
additionalDirectives
(string[]
) ...除了v-show
和v-if
之外,自定义指令也将满足此规则。应添加不带v-
前缀的项。¥
additionalDirectives
(string[]
) ... Custom directives which will satisfy this rule in addition tov-show
andv-if
. Should be added without thev-
prefix.
additionalDirectives: ["dialog"]
📚扩展阅读
¥📚 Further Reading
🚀版本
¥🚀 Version
此规则在 eslint-plugin-vue v7.0.0 中引入
¥This rule was introduced in eslint-plugin-vue v7.0.0
🔍代码实现
¥🔍 Implementation