Skip to content

vue/no-unused-refs

禁止未使用的引用

¥disallow unused refs

📖 规则详情

此规则旨在消除未使用的引用。此规则报告使用 <template> 中的 ref 属性定义但未通过 $refs 使用的 ref。

¥This rule is aimed at eliminating unused refs. This rule reports refs that are defined using the ref attribute in <template> but are not used via $refs.

注意

无法检查此规则是否在其他组件中使用(例如 mixins,通过 $refs.x.$refs 访问)。

¥This rule cannot be checked for use in other components (e.g. mixins, Access via $refs.x.$refs).

Now loading...

🔧选项

¥🔧 Options

无。

¥Nothing.

🚀版本

¥🚀 Version

此规则在 eslint-plugin-vue v7.9.0 中引入

¥This rule was introduced in eslint-plugin-vue v7.9.0

🔍代码实现

¥🔍 Implementation

eslint-plugin-vue v10.0 中文网 - 粤ICP备13048890号