feat(compiler-core): wrap slot functions with render context
This commit is contained in:
@@ -768,6 +768,8 @@ function genFunctionExpression(
|
||||
|
||||
if (genScopeId) {
|
||||
push(`_withId(`)
|
||||
} else if (isSlot) {
|
||||
push(`_withCtx(`)
|
||||
}
|
||||
push(`(`, node)
|
||||
if (isArray(params)) {
|
||||
@@ -796,8 +798,8 @@ function genFunctionExpression(
|
||||
deindent()
|
||||
push(`}`)
|
||||
}
|
||||
if (genScopeId) {
|
||||
push(`)`)
|
||||
if (genScopeId || isSlot) {
|
||||
push(`, _ctx)`)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user