vue-cli3 typescript Uncaught TypeError: Cannot set property 'components' of undefined

vue-cli3 typescript 

原因是

@Component({})
    export default class Child extends Vue {

上面沒有加

@Component({})

導致的,

加上 

@Component({})
就好了
Uncaught TypeError: Cannot set property 'components' of undefined
    at installComponents (installComponents.js?6544:11)
    at eval (Home.vue?a062:37)
    at Module../src/views/Home.vue (app.js:8305)
    at __webpack_require__ (app.js:767)
    at fn (app.js:130)
    at eval (router.ts?5f86:1)
    at Module../src/router.ts (app.js:8281)
    at __webpack_require__ (app.js:767)
    at fn (app.js:130)
    at eval (main.ts:11)

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章