- vue.js 与vue.runtime.xxx.js的区别:
(1).vue.js是完整版的Vue,包含:核心功能+模板解析器。
(2).vue.runtihe.xxx.js是运行版的Vue,只包含:核心功能;没有模板解析器。 - 因为vue.runtime.xxx.js没有模板解析器,所以不能使用template配置项,需要使用render函数接收到的createElement函数去指定具体内容。
- render函数写法:
new Vue({
el: '#app', //el的第一种写法
render: h => h(App), //箭头函数简写
// render: (h) => {
// return h(App)
// } //箭头函数写法
// render(h) {
// return h(App)
// } //普通函数写法
})
// .$mount('#app') //el的第二种写法