Javascript 使用Vue CLI 4和帧时出错
我一直在尝试使用Vue cli 4.2.3和aframe.io开发一个VR web应用程序 对于所有的aframe组件,都有很多类似的错误消息Javascript 使用Vue CLI 4和帧时出错,javascript,vue.js,aframe,Javascript,Vue.js,Aframe,我一直在尝试使用Vue cli 4.2.3和aframe.io开发一个VR web应用程序 对于所有的aframe组件,都有很多类似的错误消息 [Vue warn]: Unknown custom element: <a-scene> - did you register the component correctly? For recursive components, make sure to provide the "name" option. [Vue warn]: Unk
[Vue warn]: Unknown custom element: <a-scene> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
[Vue warn]: Unknown custom element: <a-cursor> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
为了方便起见,我将只写我的参考链接。
两者的代码完全相同
请帮帮我,伙计们。这件事真让我头疼答案是snake case中的这些组件与Vue发生碰撞。Vue找不到已注册的组件,因此您会得到您所遇到的错误 简而言之:告诉
Vue
与a帧相关的ignoreElements
:
Vue.config.ignoredElements = [
'a-scene',
'a-entity',
'a-camera',
'a-box',
'a-sky',
'a-sphere',
'a-cylinder',
'a-plane'
];
上面的列表并不全面,但只是一个起点。你可以随意加减
Vue.config.ignoredElements = [
'a-scene',
'a-entity',
'a-camera',
'a-box',
'a-sky',
'a-sphere',
'a-cylinder',
'a-plane'
];