写法一:
new Vue({
el: '#app',
router,
template: '<App/>',
components: { App },
})
写法二:
new Vue({
router,
template: '<App/>',
components: { App },
}).amount('#app')
写法三:
new Vue({
router,
render: h => h(App),
}).amount('#app')
或者
new Vue({
router,
render:function(h){
return h(App);
},
}).amount('#app')