Appearance
vue/no-static-inline-styles
禁止静态内联
style
属性¥disallow static inline
style
attributes
📖 规则详情
此规则报告静态内联 style
绑定和 style
属性。此规则中报告的样式意味着我们建议将它们分离到 <style>
标签中。
¥This rule reports static inline style
bindings and style
attributes. The styles reported in this rule mean that we recommend separating them into <style>
tag.
🔧选项
¥🔧 Options
json
{
"vue/no-static-inline-styles": ["error", {
"allowBinding": false
}]
}
allowBinding ...如果
true
,则允许绑定静态内联style
。默认false
。¥allowBinding ... if
true
, allow binding static inlinestyle
. defaultfalse
.
"allowBinding": true
📚扩展阅读
¥📚 Further Reading
🚀版本
¥🚀 Version
此规则在 eslint-plugin-vue v7.0.0 中引入
¥This rule was introduced in eslint-plugin-vue v7.0.0
🔍代码实现
¥🔍 Implementation