Skip to content

vue/v-for-delimiter-style

强制 v-for 指令的分隔符样式

  • 🔧 command line 上的 --fix 选项可以自动修复此规则报告的一些问题。

📖 规则详情

此规则强制在 v-for 指令中应使用哪个分隔符(inof)。

¥This rule enforces which delimiter (in or of) should be used in v-for directives.

Now loading...

🔧选项

¥🔧 Options

默认值设置为 in

¥Default is set to in.

json
{
  "vue/v-for-delimiter-style": ["error", "in" | "of"]
}
  • "in"(默认)...需要使用 in

    ¥"in" (default) ... requires using in.

  • "of" ...需要使用 of

    ¥"of" ... requires using of.

"of"

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.0 中文网 - 粤ICP备13048890号