From: Evan You Date: Thu, 20 Sep 2018 06:11:05 +0000 (-0400) Subject: chore: comments X-Git-Tag: v3.0.0-alpha.0~1220 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1ef0d0382966f6d9c05b815256b1cb315858696d;p=thirdparty%2Fvuejs%2Fcore.git chore: comments --- diff --git a/packages/vue/src/index.ts b/packages/vue/src/index.ts index 437f31a5f7..778d33b8e3 100644 --- a/packages/vue/src/index.ts +++ b/packages/vue/src/index.ts @@ -18,8 +18,14 @@ class Vue extends Component { return } + // in compat mode, h() can take an options object and will convert it + // to a 3.x class-based component. const vnode = h(options) + // the component class is cached on the options object as ._normalized const instance = createComponentInstance(vnode, options._normalized, null) + // set the instance on the vnode before mounting. + // the mount function will skip creating a new instance if it finds an + // existing one. vnode.children = instance function mount(el: any) {