Open SageSanyue opened 2 years ago
在项目中使用 import VueScroll from '@david-j/vue-j-scroll'; Vue.use(VueScroll);
请问如果我只在单个.vue文件内使用,正确的引入写法应该怎么写?
<vue-j-scroll></vue-j-scroll> import VueScroll from '@david-j/vue-j-scroll'; export default { component: { VueScroll } }
局部引入会报错: [Vue warn]: Unknown custom element: <vue-j-scroll> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
[Vue warn]: Unknown custom element: <vue-j-scroll> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
如果在.vue文件里写成:
<vue-j-scroll></vue-j-scroll> import VueJScroll from '@david-j/vue-j-scroll'; export default { component: { VueJScroll } }
又会报错成:[Vue warn]: Failed to mount component: template or render function not defined.
[Vue warn]: Failed to mount component: template or render function not defined.
引入不了,因为作者只导出了插件,没有导出原始组件
请问如果我只在单个.vue文件内使用,正确的引入写法应该怎么写?
局部引入会报错:
[Vue warn]: Unknown custom element: <vue-j-scroll> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
如果在.vue文件里写成:
又会报错成:
[Vue warn]: Failed to mount component: template or render function not defined.