[Vue warn]: 未知的自定义元素
[Vue warn]: Unknown custom element
我是 vuejs 的新手,在 laravel 框架中编写一段 js 代码时,出现错误:
[Vue warn]: Unknown custom element: <app> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
App.js
import Vue from 'vue'
import Vcinfo from './Vcinfo.vue'
import router from './router'
const app = new Vue({
el: '#vcinfo',
components: { Vcinfo },
template: '<app></app>',
router
})
请建议怎么做?
这是为了将来 reader。
我犯了一个错误,我不得不这样使用它。
import Vue from 'vue'
import Vcinfo from './Vcinfo.vue'
import router from './router'
const app = new Vue({
el: '#vcinfo',
components: { Vcinfo },
template: '<vcinfo></vcinfo>',
router
})
根据此导入 import Vcinfo from './Vcinfo.vue'
我是 vuejs 的新手,在 laravel 框架中编写一段 js 代码时,出现错误:
[Vue warn]: Unknown custom element: <app> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
App.js
import Vue from 'vue'
import Vcinfo from './Vcinfo.vue'
import router from './router'
const app = new Vue({
el: '#vcinfo',
components: { Vcinfo },
template: '<app></app>',
router
})
请建议怎么做?
这是为了将来 reader。 我犯了一个错误,我不得不这样使用它。
import Vue from 'vue'
import Vcinfo from './Vcinfo.vue'
import router from './router'
const app = new Vue({
el: '#vcinfo',
components: { Vcinfo },
template: '<vcinfo></vcinfo>',
router
})
根据此导入 import Vcinfo from './Vcinfo.vue'