Appearance
vue/valid-v-is
强制有效的
v-is
指令
- ⚙️ 此规则包含在
"plugin:vue/essential"
、*.configs["flat/essential"]
、"plugin:vue/strongly-recommended"
、*.configs["flat/strongly-recommended"]
、"plugin:vue/recommended"
和*.configs["flat/recommended"]
中。
此规则检查每个 v-is
指令是否有效。
¥This rule checks whether every v-is
directive is valid.
📖 规则详情
此规则在以下情况下报告 v-is
指令:
¥This rule reports v-is
directives in the following cases:
该指令有该参数。例如
<div v-is:aaa="foo"></div>
¥The directive has that argument. E.g.
<div v-is:aaa="foo"></div>
该指令具有该修饰符。例如
<div v-is.bbb="foo"></div>
¥The directive has that modifier. E.g.
<div v-is.bbb="foo"></div>
该指令没有该属性值。例如
<div v-is></div>
¥The directive does not have that attribute value. E.g.
<div v-is></div>
该指令位于 Vue 组件上。例如
<MyComponent v-is="foo"></MyComponent>
¥The directive is on Vue-components. E.g.
<MyComponent v-is="foo"></MyComponent>
注意
此规则不检查指令中的语法错误,因为它由 vue/no-parsing-error 规则检查。
¥This rule does not check syntax errors in directives because it's checked by vue/no-parsing-error rule.
🔧选项
¥🔧 Options
无。
¥Nothing.
👫相关规则
¥👫 Related Rules
📚扩展阅读
¥📚 Further Reading
🚀版本
¥🚀 Version
此规则在 eslint-plugin-vue v7.0.0 中引入
¥This rule was introduced in eslint-plugin-vue v7.0.0
🔍代码实现
¥🔍 Implementation