Skip to content

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.

Now loading...

🔧选项 ​

¥🔧 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 to v-show and v-if. Should be added without the v- prefix.

additionalDirectives: ["dialog"] ​

Now loading...

📚扩展阅读 ​

¥📚 Further Reading

🚀版本 ​

¥🚀 Version

此规则在 eslint-plugin-vue v7.0.0 中引入

¥This rule was introduced in eslint-plugin-vue v7.0.0

🔍代码实现 ​

¥🔍 Implementation

eslint-plugin-vue v10.4 中文网 - 粤ICP备13048890号