Skip to content

vue/require-direct-export

要求直接导出组件

¥require the component to be directly exported

📖 规则详情

此规则旨在要求直接导出组件对象。

¥This rule aims to require that the component object be directly exported.

Now loading...
Now loading...

🔧选项

¥🔧 Options

json
{
  "vue/require-direct-export": ["error", {
    "disallowFunctionalComponentFunction": false
  }]
}
  • "disallowFunctionalComponentFunction" ...如果是 true,则不允许使用 Vue 3.x 中可用的功能组件函数。默认 false

    ¥"disallowFunctionalComponentFunction" ... If true, disallow functional component functions, available in Vue 3.x. default false

"disallowFunctionalComponentFunction": false

Now loading...

"disallowFunctionalComponentFunction": true

Now loading...

🚀版本

¥🚀 Version

此规则在 eslint-plugin-vue v5.2.0 中引入

¥This rule was introduced in eslint-plugin-vue v5.2.0

🔍代码实现

¥🔍 Implementation

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