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);
手机扫一扫
移动阅读更方便
你可能感兴趣的文章