在 src/App.vue 中为什么删除了<div id="App"></div>,程序还能正常运行呢?
在main.js中,设置了挂载点el:'#app',现在我们在App.vue中又换成了class='container',程序还能正常运行,这是为什么呢?谢谢指教
new Vue({
el: '#app',
components: { App },
template: '<App/>'
})
<template>
<div class="container">
...
</div>
</template>
入口文件
index.html
中有挂载vue
实例的div
容器