您的位置:首页 > 产品设计 > UI/UE

Do not mount Vue to <html> or <body> - mount tonormal elements instead.

2017-09-20 14:39 761 查看
1.vue1.x 允许开发者以 <body> 或 <html> 作为根实体的挂载点,但到了VueJS2.0 后,只能通过独立的节点挂载 ,如:div 等。否则会产生错误,警告讯息如下:"Do not mount Vue to <html> or <body> - mount tonormal elements instead." 换成用独立的 DOM 节点,如 <divid="app"></div>,
或者
<div>
<app></app>
</div>
就可以正常运作了.

2. Vue2.x在loader上不支持直接书写!style!css!style.css;应该为都为每个loader添加一个-loader;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  vue-js webpack
相关文章推荐