Appearance
vue/no-deprecated-props-default-this
禁止在 props 默认函数中访问弃用的
this(在 Vue.js 3.0.0+ 中)
- ⚙️ 此规则包含在
"plugin:vue/essential"、*.configs["flat/essential"]、"plugin:vue/strongly-recommended"、*.configs["flat/strongly-recommended"]、"plugin:vue/recommended"和*.configs["flat/recommended"]中。
📖 规则详情
此规则报告 props 默认值工厂函数中 this 的使用。在 Vue.js 3.0.0+ 中,props 默认值工厂函数不再有权访问 this。
¥This rule reports the use of this within the props default value factory functions. In Vue.js 3.0.0+, props default value factory functions no longer have access to this.
有关更多详细信息,请参阅 迁移指南 - Props 默认函数 this 访问。
¥See Migration Guide - Props Default Function this Access for more details.
🔧选项
¥🔧 Options
无。
¥Nothing.
📚扩展阅读
¥📚 Further Reading
🚀版本
¥🚀 Version
此规则在 eslint-plugin-vue v7.0.0 中引入
¥This rule was introduced in eslint-plugin-vue v7.0.0
🔍代码实现
¥🔍 Implementation