跳至内容

vue/no-unused-refs

禁止使用未使用的 refs

📖 规则详情

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

注意

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

正在加载...

🔧 选项

无。

🚀 版本

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

🔍 实现