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

[Vue warn]: Cannot find element: #main

我们传入el 既可以,如:

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

[Vue warn]: Cannot find element: #main的更多相关文章

  1. Vue报错 [Vue warn]: Cannot find element

    在前端开发全面进入前端的时代 作为一个合格的前端开发工作者 框架是不可或缺的Vue React Anguar 作为前端小白,追随大佬的脚步来到来到博客园,更新现在正在学习的Vue 注 : 相信学习Vu ...

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

    vue浏览器报错,如下 vue.runtime.esm.js?2b0e:619 [Vue warn]: Unknown custom element: <router-Link> - di ...

  3. [Vue warn]: Unknown custom element: <sapn> - did you register the component correctly? For recursive components, make sure to provide the "name" option. found in ---> <Evaluate> at src/views/index/

    关于vue报错: [Vue warn]: Unknown custom element: <sapn> - did you register the component correctly ...

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

    一.报错截图 [Vue warn]: Unknown custom element: <wzwzihello> - did you register the component corre ...

  5. [Vue warn]: Cannot find element: #app

    转自:https://blog.csdn.net/linyeban/article/details/54629869 学习vue的时候,刚开始按照官网的例子敲写,却出现以下的问题: 问题:这是因为你的 ...

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

    Vue组件注册报错问题 import 不要加{},排查出如果页面引用单个组件的时候不要加上{}中括号,引入多个组件时才能派上用场,中括号去除问题即可解决.

  7. vue components registration & vue error & Unknown custom element

    vue components registration & vue error & Unknown custom element vue.esm.js:629 [Vue warn]: ...

  8. [Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.

    转载自:https://segmentfault.com/a/1190000006435886 解决办法:添加package.config.js配置文件中,添加本文章的红色部分代码 import vu ...

  9. [Vue warn]: Do not mount Vue to <html> or <body> - mount to normal elements instead.

    官方文档是这么解释的: 提供的元素只能作为挂载点.不同于 Vue 1.x,所有的挂载元素会被 Vue 生成的 DOM 替换.因此不推荐挂载root实例到 <html> 或者 <bod ...

随机推荐

  1. Codeforces Round #443 (Div. 1) B. Teams Formation

    B. Teams Formation link http://codeforces.com/contest/878/problem/B describe This time the Berland T ...

  2. Mac删除默认美国输入法

    1.打开sudo open ~/Library/Preferences/com.apple.HIToolbox.plist 2.找到这个,然后点击删除,最后保存,然后在立马重启 3.如果要还原,直接在 ...

  3. ACM-ICPC 2018 南京赛区网络预赛 E题

    ACM-ICPC 2018 南京赛区网络预赛 E题 题目链接: https://nanti.jisuanke.com/t/30994 Dlsj is competing in a contest wi ...

  4. .NET语言的编译过程:中间语言(IL)和即时编译器(JIT)

    .NET语言的编译分为两个阶段.首先高级语言被编译成一种称作IL的中间语言,与高级语言相比,IL更像是机器语言,然而,IL却包含一些抽象概念(比如:类.异常),这也是这种语言被称为中间语言的原因.IL ...

  5. 发票打印不全不完整的解决方案(Win10)

    发票不管怎么设置,不是二维码缺少一点,就是金额小数点后边的数字显示不全 具体原因是打印机默认纸张上A4,实际发票纸张要比A4宽度宽一点点 原来写过一篇程序方便的打印票据的控制<终于部分解决了.N ...

  6. bimgotoblock-BIM要上区块链

    比特币(BitCoin)的暴涨暴跌让参与者体验着过山车的感觉,有人一夜暴富.别墅靠海,也有人拍断大腿或者恨不得跳楼了此残生.世人也更多的听说了比特币底层的依托--区块链(BlockChain) 技术. ...

  7. jenkins获取git上的源码

    jenkins获取git上的源码会遇到三种情况,我们在这里会分别介绍一下: 一.获取git上public(公有)的项目 只需配置仓库的URL即可 jenkins下使用git获取源码的配置方法 二.获取 ...

  8. 几种序列化协议(protobuf,xstream,jackjson,jdk,hessian)相关数据对比

    测试结果 序列化数据对比 bytes字节数对比 具体的数字:   protobuf jackson xstream Serializable hessian2 hessian2压缩 hessian1 ...

  9. IOS应用内购(一)内购的种类

    Glossary IAP - In App Purchase, 应用内购. 内购种类 consumable - 可消费的,比如游戏中的金币,金币可以购买游戏道具或者装备,这个金币是可以消费的,用完之后 ...

  10. Effective Java 第三版——80. EXECUTORS, TASKS, STREAMS 优于线程

    Tips 书中的源代码地址:https://github.com/jbloch/effective-java-3e-source-code 注意,书中的有些代码里方法是基于Java 9 API中的,所 ...