Appearance
vue/no-v-model-argument
禁止向自定义组件中使用的
v-model
添加参数
- 🚫 此规则已弃用。
⚙️此规则包含在
"plugin:vue/vue2-essential"
、*.configs["flat/vue2-essential"]
、"plugin:vue/vue2-strongly-recommended"
、*.configs["flat/vue2-strongly-recommended"]
、"plugin:vue/vue2-recommended"
和*.configs["flat/vue2-recommended"]
中。¥⚙️ This rule is included in all of
"plugin:vue/vue2-essential"
,*.configs["flat/vue2-essential"]
,"plugin:vue/vue2-strongly-recommended"
,*.configs["flat/vue2-strongly-recommended"]
,"plugin:vue/vue2-recommended"
and*.configs["flat/vue2-recommended"]
.
此规则检查自定义组件上使用的 v-model
是否没有参数。
¥This rule checks whether v-model
used on custom component do not have an argument.
📖 规则详情
此规则在以下情况下报告 v-model
指令:
¥This rule reports v-model
directives in the following cases:
组件上使用的指令有一个参数。例如
<MyComponent v-model:aaa="foo" />
¥The directive used on component has an argument. E.g.
<MyComponent v-model:aaa="foo" />
🔧选项
¥🔧 Options
无。
¥Nothing.
👫相关规则
¥👫 Related Rules
🚀版本
¥🚀 Version
此规则在 eslint-plugin-vue v7.0.0 中引入
¥This rule was introduced in eslint-plugin-vue v7.0.0
🔍代码实现
¥🔍 Implementation