Vue.$mount 挂载
//index.html文件
<body>
<div id="app"></div>
</body>
//index.js文件
//1. 先看看普通的绑定
new Vue({
el: '#app',
// el: document.getElementById('app')
template: `<div id="app">
如果new Vue时候的option的el属性存在,那么它会自动的绑定并渲染到页面上
</div>`
})
//2. vm.$mount( [elementOrSelector] ) 元素或者选择器(类'#app')
/*如果没有提供 elementOrSelector 参数,模板将被渲染为文档之外的的元素,并且你必须使用原生 DOM API 把它插入文档中*/
//2.1
var vm = new Vue({