Skip to content

vue/no-custom-modifiers-on-v-model

禁止在组件上使用 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"] 中。

此规则检查组件上使用的 v-model 是否没有自定义修饰符。

¥This rule checks whether v-model used on the component do not have custom modifiers.

📖 规则详情

此规则在以下情况下报告 v-model 指令:

¥This rule reports v-model directives in the following cases:

  • 组件上使用的指令具有自定义修饰符。例如<MyComponent v-model.aaa="foo" />

    ¥The directive used on the component has custom modifiers. E.g. <MyComponent v-model.aaa="foo" />

Now loading...

🔧选项

¥🔧 Options

无。

¥Nothing.

👫相关规则

¥👫 Related Rules

🚀版本

¥🚀 Version

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

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

🔍代码实现

¥🔍 Implementation

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