使用vue框架的时候,如果页面提示如下错误,则说明new Vue的时候没有传入 el 的值:

[Vue warn]: Cannot find element: #main

我们传入el 既可以,如:

var main = new Vue({el: '#main',data: {currentActivity: 'home'}
}):

转载于:https://www.cnblogs.com/ayseeing/p/5086670.html

[Vue warn]: Cannot find element: #main相关推荐

  1. [Vue warn]: Unknown custom element: <Top> - did you register the component correctly?

    [Vue warn]: Unknown custom element: - did you register the component correctly? 错误如下: 出现错误的原因有以下几种: ...

  2. [Vue warn]: Unknown custom element: <helptext> - did you register the component correctly? For recu

    报错信息: vue.js:634 [Vue warn]: Unknown custom element: - did you register the component correctly? For ...

  3. 解决[Vue warn]: Unknown custom element: <ag> - did you register the component correctly? For recursive

    [Vue warn]: Unknown custom element: <ag> - did you register the component correctly? For recur ...

  4. [Vue warn]: Unknown custom element: vhead - did you register the component correctly? For recursiv

    [Vue warn]: Unknown custom element: <vhead> - did you register the component correctly? For re ...

  5. vue.js报错 vue.js:597 [Vue warn]: Cannot find element: #app

    刚开始使用vue的时候发现vue报vue.js:597 [Vue warn]: Cannot find element: #app的错误,初始以为是写的代码有错误导致,于是认真的对照了几遍发现代码和官 ...

  6. vue-2.5.16.js:597 [Vue warn]: Unknown custom element: ocean - did you register the component corre

    vue-2.5.16.js:597 [Vue warn]: Unknown custom element: - did you register the component correctly? Fo ...

  7. Vue报错-[Vue warn]: Unknown custom element: <van-action-sheet> - did you register the component correc

    项目场景: 今天在使用到vant组件的时候引入报错. [Vue warn]: Unknown custom element: <van-action-sheet> - did you re ...

  8. 【 已解决】[Vue warn]:Unknown custom element: <a-calendar> - did you register the component correctly

    [Vue warn]: Unknown custom element: - did you register the component correctly? For recursive compon ...

  9. [Vue warn]: Unknown custom element: usertree - did you register the component correctly? For recur

    [Vue warn]: Unknown custom element: <usertree> - did you register the component correctly? For ...

最新文章

  1. linux常用命令简介- 用户管理及文件属性
  2. Python之并发编程
  3. 了解Windows内核内存池
  4. S6 文件备份与压缩命令
  5. Linux上用户之间对话
  6. Opencv EmguCv 基本识别步骤
  7. 反卷积(Deconvolution)、上采样(UNSampling)与上池化(UnPooling)加入自己的思考(pytorch函数)(三)
  8. sprint 3 总结
  9. eclipse连接数据库
  10. 基于android鲜花销售app,基于Android的鲜花APP设计任务书
  11. Intellij IDEA 代码格式化配置和快捷键
  12. 如何彻底关闭UAC----之注册表篇
  13. 吴伯凡-认知方法论-如何消除认知阑尾
  14. Intent基本概念
  15. GraphGallery,一个基于TensorFlow 2.x与 PyTorch 的GNN benchmark 框架
  16. 举例解释大数定律、中心极限定理及其在机器学习中的应用
  17. sql注入中的联合注入
  18. 【计算机操作系统】-进程切换什么时候会发生呢?
  19. Windows电脑上微信双开(多开)的办法
  20. 各种计算机编程语言之父

热门文章

  1. 小户型吊顶的注意事项有哪些
  2. 深耕小而美的领域,也能过好一生
  3. 用双边模式,让生意立刻火爆
  4. 房贷提前还款怎么还?
  5. git上传代码和下拉
  6. sort()与cmp()
  7. 关于js中replace()只能替换字符串中第一个对象的问题
  8. java jint_Android使用JNI实现Java与C之间传递数据
  9. druid连接池mysql自动关闭_探究Druid连接池“违反协议”异常
  10. ssis for循环容器_SSIS Foreach循环与For循环容器