<div id = "root">
Vue
</div>
//1、使用el
const v = new Vue ({
el: '#root',
})
//2、使用vue.$mount,好处是更加灵活
v.$mount("#root")
08-15
947
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
<div id = "root">
Vue
</div>
//1、使用el
const v = new Vue ({
el: '#root',
})
//2、使用vue.$mount,好处是更加灵活
v.$mount("#root")