|
@ -41,38 +41,16 @@ function _createElement ( |
|
|
// in case of component :is set to falsy value
|
|
|
// in case of component :is set to falsy value
|
|
|
return emptyVNode() |
|
|
return emptyVNode() |
|
|
} |
|
|
} |
|
|
if (typeof tag === 'string') { |
|
|
const Ctor = typeof tag === 'string' |
|
|
const namespace = config.getTagNamespace(tag) |
|
|
? resolveAsset(context.$options, 'components', tag) |
|
|
let Ctor |
|
|
: tag |
|
|
if (config.isReservedTag(tag)) { |
|
|
if (Ctor) { |
|
|
return new VNode( |
|
|
return createComponent(Ctor, data, parent, context, host, children) |
|
|
tag, data, normalizeChildren(children, namespace), |
|
|
} else if (typeof tag === 'string') { |
|
|
undefined, undefined, |
|
|
const ns = config.getTagNamespace(tag) |
|
|
namespace, context, host |
|
|
return new VNode( |
|
|
) |
|
|
tag, data, normalizeChildren(children, ns), |
|
|
} else if ((Ctor = resolveAsset(context.$options, 'components', tag))) { |
|
|
undefined, undefined, ns, context, host |
|
|
return createComponent(Ctor, data, parent, context, host, children, tag) |
|
|
) |
|
|
} else { |
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
|
|
if ( |
|
|
|
|
|
!namespace && |
|
|
|
|
|
!(config.ignoredElements && config.ignoredElements.indexOf(tag) > -1) && |
|
|
|
|
|
config.isUnknownElement(tag) |
|
|
|
|
|
) { |
|
|
|
|
|
warn( |
|
|
|
|
|
'Unknown custom element: <' + tag + '> - did you ' + |
|
|
|
|
|
'register the component correctly? For recursive components, ' + |
|
|
|
|
|
'make sure to provide the "name" option.' |
|
|
|
|
|
) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return new VNode( |
|
|
|
|
|
tag, data, normalizeChildren(children, namespace), |
|
|
|
|
|
undefined, undefined, |
|
|
|
|
|
namespace, context, host |
|
|
|
|
|
) |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
return createComponent(tag, data, parent, context, host, children) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|