Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/390.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vue.js/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 使用Vue CLI 4和帧时出错_Javascript_Vue.js_Aframe - Fatal编程技术网

Javascript 使用Vue CLI 4和帧时出错

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 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]: 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'
];