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

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>,就可以正常运作了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐