Appearance
vue/no-restricted-v-on 
禁止在
v-on中禁止特定参数¥disallow specific argument in
v-on
📖 规则详情 
此规则允许你指定你不想在应用中使用的 v-on 参数名称。
¥This rule allows you to specify v-on argument names that you don't want to use in your application.
🔧选项 
¥🔧 Options
此规则采用字符串列表,其中每个字符串都是要限制的参数名称或模式:
¥This rule takes a list of strings, where each string is a argument name or pattern to be restricted:
json
{
  "vue/no-restricted-v-on": ["error", "foo", "/^bar/"]
}或者,该规则也接受对象。
¥Alternatively, the rule also accepts objects.
json
{
  "vue/no-restricted-v-on": [
    "error",
    {
      "argument": "foo",
      "message": "Use \"v-on:x\" instead."
    },
    {
      "argument": "bar",
      "message": "\"@bar\" is deprecated."
    }
  ]
}可以为对象指定以下属性。
¥The following properties can be specified for the object.
- argument...指定参数名称或模式或- null。如果指定了- null,则与- v-on=匹配。- ¥ - argument... Specify the argument name or pattern or- null. If- nullis specified, it matches- v-on=.
- modifiers...指定修饰符名称的数组。如果指定,则仅在使用指定的修饰符时才会报告。- ¥ - modifiers... Specifies an array of the modifier names. If specified, it will only be reported if the specified modifier is used.
- element...指定元素名称或模式。如果指定,则仅在指定元素上使用时才会报告。- ¥ - element... Specify the element name or pattern. If specified, it will only be reported if used on the specified element.
- message...指定可选的自定义消息。- ¥ - message... Specify an optional custom message.
{ "argument": "foo", "modifiers": ["prevent"] } 
{ "argument": "foo", "element": "MyButton" } 
👫相关规则 
¥👫 Related Rules
🚀版本 
¥🚀 Version
此规则是在 eslint-plugin-vue v9.21.0 中引入的
¥This rule was introduced in eslint-plugin-vue v9.21.0
🔍代码实现 
¥🔍 Implementation