mirror of https://github.com/vuejs/core.git
Merge d2c6e2d5b5
into bb4ae25793
This commit is contained in:
commit
957f2b8615
|
@ -150,8 +150,9 @@ export function createComponent(
|
|||
resetInsertionState()
|
||||
}
|
||||
|
||||
const isFnComponent = isFunction(component)
|
||||
// vdom interop enabled and component is not an explicit vapor component
|
||||
if (appContext.vapor && !component.__vapor) {
|
||||
if (appContext.vapor && !isFnComponent && !component.__vapor) {
|
||||
const frag = appContext.vapor.vdomMount(
|
||||
component as any,
|
||||
rawProps,
|
||||
|
@ -205,7 +206,7 @@ export function createComponent(
|
|||
setupPropsValidation(instance)
|
||||
}
|
||||
|
||||
const setupFn = isFunction(component) ? component : component.setup
|
||||
const setupFn = isFnComponent ? component : component.setup
|
||||
const setupResult = setupFn
|
||||
? callWithErrorHandling(setupFn, instance, ErrorCodes.SETUP_FUNCTION, [
|
||||
instance.props,
|
||||
|
@ -214,7 +215,7 @@ export function createComponent(
|
|||
: EMPTY_OBJ
|
||||
|
||||
if (__DEV__ && !isBlock(setupResult)) {
|
||||
if (isFunction(component)) {
|
||||
if (isFnComponent) {
|
||||
warn(`Functional vapor component must return a block directly.`)
|
||||
instance.block = []
|
||||
} else if (!component.render) {
|
||||
|
|
Loading…
Reference in New Issue