| 3085 | } |
| 3086 | |
| 3087 | function createComponentInstanceForVnode ( |
| 3088 | vnode, // we know it's MountedComponentVNode but flow doesn't |
| 3089 | parent, // activeInstance in lifecycle state |
| 3090 | parentElm, |
| 3091 | refElm |
| 3092 | ) { |
| 3093 | var vnodeComponentOptions = vnode.componentOptions; |
| 3094 | var options = { |
| 3095 | _isComponent: true, |
| 3096 | parent: parent, |
| 3097 | propsData: vnodeComponentOptions.propsData, |
| 3098 | _componentTag: vnodeComponentOptions.tag, |
| 3099 | _parentVnode: vnode, |
| 3100 | _parentListeners: vnodeComponentOptions.listeners, |
| 3101 | _renderChildren: vnodeComponentOptions.children, |
| 3102 | _parentElm: parentElm || null, |
| 3103 | _refElm: refElm || null |
| 3104 | }; |
| 3105 | // check inline-template render functions |
| 3106 | var inlineTemplate = vnode.data.inlineTemplate; |
| 3107 | if (inlineTemplate) { |
| 3108 | options.render = inlineTemplate.render; |
| 3109 | options.staticRenderFns = inlineTemplate.staticRenderFns; |
| 3110 | } |
| 3111 | return new vnodeComponentOptions.Ctor(options) |
| 3112 | } |
| 3113 | |
| 3114 | function resolveAsyncComponent ( |
| 3115 | factory, |