开发者社区 问答 正文

Vue-Lazyload ?报错

Vue-Lazyload的问题

全局引入

import VueLazyload from "vue-lazyload";
Vue.use(VueLazyload, {
    lazyComponent: true
});

页面上

<lazyComponent @show="handler"></lazyComponent>

报错

[Vue warn]: Unknown custom element: <lazy-component> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

展开
收起
爱吃鱼的程序员 2020-06-06 15:16:24 727 分享 版权
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB
                        <p>我重新建了个新的项目,导入没有问题。。老项目重新cnpm install后还是注册不上,求大神解答啊</p>
    
                    
    
                        <p>是<lazy-component></p>
    
                    
    
                            不是,我代码贴错了,就是用的<lazy-component>
    
    2020-06-06 15:16:44
    赞同 展开评论
问答分类:
问答标签:
问答地址: