render and patch
2017-11-27 12:02:39 1 举报
Vue 渲染
作者其他创作
大纲/内容
vnode.elm = createElement
createElem
singleComponent
isComment
has slots
proxy.render()
this._render()
callHook('init')
childComponentInstance
createChildren
App.vue
callHook('prepatch')
vnode
has render
createComment
has vnode.tag
文本
NO
YES
createComponent
updateChildComponent
isText
createTextNode
$mount('#app')
Is Html Elment
1阶段——render
patch
childComponentInstance.$mount
patchVnode
createComponentInstanceForVnode
updateChildren
2阶段——patch
update
import App from './app.js'; var vm = new Vue({ render: (h) = h(App); });
Is First
更改props
http://www.processon.com
vm.$forceUpdate
updateComponent
Vue.complie(template)
0 条评论
下一页