Appearance
vue/require-expose
要求使用
expose
声明公共属性
- 💡 此规则报告的某些问题可由编辑器 suggestions 手动修复。
📖 规则详情
此规则强制组件使用 expose
明确声明向组件公开的属性。你可以使用 expose
来控制组件的内部属性,以便它们不能被外部引用。
¥This rule enforces the component to explicitly declare the exposed properties to the component using expose
. You can use expose
to control the internal properties of a component so that they cannot be referenced externally.
expose
API 在 Vue 3.2 中正式引入。
¥The expose
API was officially introduced in Vue 3.2.
🔧选项
¥🔧 Options
无。
¥Nothing.
📚扩展阅读
¥📚 Further Reading
🚀版本
¥🚀 Version
此规则在 eslint-plugin-vue v7.14.0 中引入
¥This rule was introduced in eslint-plugin-vue v7.14.0
🔍代码实现
¥🔍 Implementation