Vue2+Webpack错误:Do not mount Vue to <html> or <body> - mount tonormal elements instead.
2017-02-22 09:20
721 查看
vue1.x 允许开发者以 <body> 或 <html> 作为根实体的挂载点,但到了VueJS2.0 后,只能通过 独立的节点挂载 ,如:div 等。
否则会产生错误,警告讯息如下:"Do not mount Vue to <html> or <body> - mount tonormal elements instead."
换成用独立的 DOM 节点,如 <divid="app"></div>,就可以正常运作了。
否则会产生错误,警告讯息如下:"Do not mount Vue to <html> or <body> - mount tonormal elements instead."
换成用独立的 DOM 节点,如 <divid="app"></div>,就可以正常运作了。
相关文章推荐
- Do not mount Vue to <html> or <body> - mount to normal elements instead.
- Do not mount Vue to <html> or <body> - mount tonormal elements instead.
- vue2.0(新手)第一个坑--do not mount Vue to <body>!!!
- vue2.0(新手)第一个坑--do not mount Vue to <body>!!!
- vue项目报错'Do not use built-in or reserved HTML elements as component id:'
- vue引入组件无法显示且报错[Vue warn]: Do not use built-in or reserved HTML elements as component id: header
- vue Do not use built-in or reserved HTML elements as component id: nav
- [Vue warn]: Do not use built-in or reserved HTML elements as component id:
- vue.js基本使用 利用webpack"热"运行vuejs+html初步和关键步骤 <二>
- maven中出现web.xml is missing and <failOnMissingWebXml> is set to true的错误如何解决
- Web开发敏捷之道-应用Rails进行敏捷Web开发-第三版 92页 错误提示 syntax error, unexpected ')' ..._cart" , :id => product } do ).to_s) 解决办法
- maven项目出现web.xml is missing and <failOnMissingWebXml> is set to true错误的解决办法
- 创建Maven项目时提示web.xml is missing and <failOnMissingWebXml> is set to true错误解决方案
- web.xml is missing and <failOnMissingWebXml> is set to true 错误解决办法
- 创建Maven项目时提示web.xml is missing and <failOnMissingWebXml> is set to true错误解决方案
- Python之Headers value 1 must be of type str or bytes, not <class 'int'>错误的解决
- 关于webpack中<%= htmlWebpackPlugin.options.title %> 无法解析的原因
- Android Studio 启动问题<does not point to a valid jvm installation>错误
- Vue+Webpack引入Jquery第三方插件,jQuery is not defined 错误,解决方案
- Failed to mount component: template or render function not defined. 错误的解决方法