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


在引入該組件時,報了個這樣的警告,組件死活引入不到,什么原因呢?

<template>
  <div id="app">
    我是APP.vue組件----{{msg}}
    <hr/>
    <Father/>
  </div>
</template>

<script>
import Father from './components/Father.vue'
// import Vue from 'vue'
// Vue.component('Father',Father)
export default {
 name:'app',
 data() {
   return {
     msg: 'hellow-word'
   }
 },
 components:{//局部注冊組件..
   Father
 }
}
</script>

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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM