runtime-compiler与runtime-only的区别
1.首先
2.Vue程序的运行过程
template(模板)传给vue,vue保存给vue实例下的options,然后将templ解析为一个抽象语法树结构(ast),之后将它编译为一个render函数,随后把template翻译成为虚拟的dom,虚拟的dom节点,构成虚拟dom树,最后渲染成真实的dom,也就是UI展示出来
runtime-compiler:
template–>ast–>render–>vdom–>Ul
runtime-only:
render–>vdom–>Ul
3.区别
1.runtime-only的性能更高,效率更快
2.runtime-only的代码更少
完结,撒花~