MCPcopy
hub / github.com/fanmingming/live / createComponentInstanceForVnode

Function createComponentInstanceForVnode

m3u8/vue.js:3274–3290  ·  view source on GitHub ↗
(
    vnode, // we know it's MountedComponentVNode but flow doesn't
    parent // activeInstance in lifecycle state
  )

Source from the content-addressed store, hash-verified

3272 }
3273
3274 function createComponentInstanceForVnode (
3275 vnode, // we know it's MountedComponentVNode but flow doesn't
3276 parent // activeInstance in lifecycle state
3277 ) {
3278 var options = {
3279 _isComponent: true,
3280 _parentVnode: vnode,
3281 parent: parent
3282 };
3283 // check inline-template render functions
3284 var inlineTemplate = vnode.data.inlineTemplate;
3285 if (isDef(inlineTemplate)) {
3286 options.render = inlineTemplate.render;
3287 options.staticRenderFns = inlineTemplate.staticRenderFns;
3288 }
3289 return new vnode.componentOptions.Ctor(options)
3290 }
3291
3292 function installComponentHooks (data) {
3293 var hooks = data.hook || (data.hook = {});

Callers 1

vue.jsFile · 0.85

Calls 1

isDefFunction · 0.85

Tested by

no test coverage detected