refactor: applyDirectives -> withDirectives

This commit is contained in:
Evan You
2019-10-18 16:35:01 -04:00
parent cba34453db
commit e98a85f3cb
20 changed files with 63 additions and 64 deletions

View File

@@ -23,7 +23,7 @@ import {
CREATE_VNODE,
FRAGMENT,
helperNameMap,
APPLY_DIRECTIVES,
WITH_DIRECTIVES,
CREATE_BLOCK
} from './runtimeHelpers'
import { isVSlot, createBlockExpression } from './utils'
@@ -243,7 +243,7 @@ function finalizeRoot(root: RootNode, context: TransformContext) {
const codegenNode = child.codegenNode as
| ElementCodegenNode
| ComponentCodegenNode
if (codegenNode.callee === APPLY_DIRECTIVES) {
if (codegenNode.callee === WITH_DIRECTIVES) {
codegenNode.arguments[0].callee = helper(CREATE_BLOCK)
} else {
codegenNode.callee = helper(CREATE_BLOCK)