vue components registration & vue error & Unknown custom element
vue components registration & vue error & Unknown custom element
vue.esm.js:629 [Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.
https://github.com/xgqfrms/angular-1.4.3/issues/4
// 挂载 vue components
setTimeout (() => {
const dom = document.querySelector('zwy-spu-prodcut');
console.log(`custom element dom`, dom);
new Vue ({
el: dom,
// name: "zwy-spu",
components: {
// ZwySpuProduct,// Error
"zwy-spu-prodcut": ZwySpuProduct,// OK
},
data () {
return {
id: $stateParams.activityId,
// activityId: $stateParams.activityId,
};
},
});
}, 0);
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/12190664.html
未经授权禁止转载,违者必究!