Skip to content

对Vue.prototype.__patch__方法注解的修改 #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion vue-src/core/instance/lifecycle.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export function lifecycleMixin (Vue: Class<Component>) {
vm._vnode = vnode
// Vue.prototype.__patch__ is injected in entry points
// based on the rendering backend used.
/*基于后端渲染Vue.prototype.__patch__被用来作为一个入口*/
/*Vue.prototype.__patch__方法在入口处platforms/web/runtime/index.js注入。该方法是作为渲染过程的后台方法被使用到。渲染过程为:render函数 => vnode虚拟dom => 真实dom*/
if (!prevVnode) {
// initial render
vm.$el = vm.__patch__(
Expand Down