MCPcopy Create free account
hub / github.com/TruthHun/BookStack / createComponentInstanceForVnode

Function createComponentInstanceForVnode

static/vuejs/vue.runtime.common.js:3089–3114  ·  view source on GitHub ↗
(
  vnode, // we know it's MountedComponentVNode but flow doesn't
  parent, // activeInstance in lifecycle state
  parentElm,
  refElm
)

Source from the content-addressed store, hash-verified

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

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected