Appearance
vue/max-template-depth
强制模板的最大深度
¥enforce maximum depth of template
📖 规则详情
此规则强制在 Vue SFC 中强制模板的最大深度,以帮助提高可维护性并降低复杂性。
¥This rule enforces a maximum depth of the template in a Vue SFC, in order to aid in maintainability and reduce complexity.
🔧选项
¥🔧 Options
此规则采用一个对象,你可以在其中指定 Vue SFC 模板块中允许的最大深度。可以为对象指定一个属性。
¥This rule takes an object, where you can specify the maximum depth allowed in a Vue SFC template block. There is one property that can be specified for the object.
maxDepth
...指定template
块的最大模板深度。¥
maxDepth
... Specify the maximum template depthtemplate
block.
{ maxDepth: 3 }
🚀版本
¥🚀 Version
此规则是在 eslint-plugin-vue v9.28.0 中引入的
¥This rule was introduced in eslint-plugin-vue v9.28.0
🔍代码实现
¥🔍 Implementation