1.使用render渲染函数之前的写法
new Vue({
el:"#app",
components:{
App
},
template:"<App/>"
})
2.使用render渲染函数之后的写法
render渲染函数,相当于将component属性和template属性二者的代码换作了简化写法
new Vue({
el:"#app",
render:h => h(App)//传入的参数h是一个函数createElement()函数的对象
})
3.render渲染函数的原本写法
new Vue({
el:"#app",
//render:h=>h(App)//常用render的箭头形式的写法
render: function(createElement){
return createElement(App);
}
})