错误:未知自定义元素(仅适用于某些组件)



我在尝试导入 noveotpassword.vue login.vue.vue 时会收到以下错误。 tooltip.vue 可以导入而没有错误?无法弄清楚我在做什么不同。我以前也有类似的问题。有时我会随机遇到此错误(它在和关闭(:

[Vue warn]: Unknown custom element: <forgot-password> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
found in
---> <Login> at src/components/register/Login.vue
       <Register> at src/views/Register.vue
         <App> at src/App.vue
           <Root>

login.vue:

<template>
  <div id="login">
    <tooltip />
    <forgot-password />
  </div>
</template>
import {
  Tooltip,
  ForgotPassword
} from '@/components'
export default {
  components: {
    Tooltip,
    ForgotPassword
  }
}

noveotpassword.vue(不使用道具名称,但也尝试过。

<template>
  <div id="forgot-password">
    ouch..
  </div>
</template>

组件/index.js(用于分组的导入(:

import Tooltip from './Tooltip.vue'
import ForgotPassword from './ForgotPassword.vue'
export {
  Tooltip,
  ForgotPassword
}

您正在导出 hovepassword ,并导入 noveotpassword 。更改其中一个

最新更新