1. 程式人生 > 其它 >did you register the component correctly? For recursive components, make sure to provide the “name“

did you register the component correctly? For recursive components, make sure to provide the “name“

技術標籤:vue

報錯截圖:

在寫一個摺疊元件動畫,引入該元件時,報了個這樣的警告,元件死活引入不到,什麼原因呢?

import ball from '../components/ball'
export default {
  component: {
    'run-ball': ball 
  }
},
 
//使用
<run-ball :newslist="newslist"></run-ball>

上面是我的程式碼,引入,註冊,使用,沒有問題啊!

經過仔細對比程式碼,發現我用的component應該是components,怪自己不仔細了!