runtimecompiler 和 runtimeonly是什么
大纲
1.runtimecompiler 和 runtimeonly是什么
2.runtimeonly优点
1. runtimecompiler 和 runtimeonly 是什么?
runtimecompiler
模板渲染DOM模式:template -> ast -> render -> vdom -> UI
new Vue({
el:'#app',
components:{App},
template:'<App/>',
})
runtimeonly
模板渲染DOM模式:render -> vdom -> UI
new Vue({
el:'#app',
render:h=>h(App)
})
2.runtimeonly优点
runtimeonly优点:性能更高,代码量更少

浙公网安备 33010602011771号