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;
Do not mount Vue to <html> or <body> - mount tonormal elements instead.
最新推荐文章于 2023-01-04 15:55:46 发布