]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: rename & property missing (#335)
authorHcySunYang <HcySunYang@outlook.com>
Mon, 21 Oct 2019 14:00:23 +0000 (22:00 +0800)
committerEvan You <yyx990803@gmail.com>
Mon, 21 Oct 2019 14:00:23 +0000 (10:00 -0400)
packages/compiler-core/__tests__/transform.spec.ts
packages/compiler-core/__tests__/transforms/vFor.spec.ts
packages/compiler-core/src/ast.ts
packages/compiler-core/src/parse.ts
packages/runtime-core/src/directives.ts

index a4fe1911d9352c01c642c915506bd273107e7ff4..3119fa01b739b608003f4cfcbe38d2a17a123df2 100644 (file)
@@ -313,7 +313,7 @@ describe('compiler: transform', () => {
           },
           {
             type: NodeTypes.JS_CALL_EXPRESSION,
-            // should wrap applyDirectives() around createBlock()
+            // should wrap withDirectives() around createBlock()
             callee: WITH_DIRECTIVES,
             arguments: [
               { callee: CREATE_BLOCK },
index a5b81a8c67b98aabf7b9c73783f53639356b57e1..39b34c532d7867bb7563f1e34bad7484890ca265 100644 (file)
@@ -857,7 +857,7 @@ describe('compiler: v-for', () => {
         type: NodeTypes.JS_SEQUENCE_EXPRESSION,
         expressions: [
           { callee: OPEN_BLOCK },
-          // should wrap applyDirectives() around createBlock()
+          // should wrap withDirectives() around createBlock()
           {
             callee: WITH_DIRECTIVES,
             arguments: [
index e2faabc974237ed443b022ccc671b7017e1271e1..3d0fbd2a4c1abf58fd84e4257019e16ed63be6d9 100644 (file)
@@ -396,7 +396,7 @@ export interface DynamicSlotFnProperty extends Property {
   value: SlotFunctionExpression
 }
 
-// applyDirectives(createVNode(...), [
+// withDirectives(createVNode(...), [
 //    [_directive_foo, someValue],
 //    [_directive_bar, someValue, "arg", { mod: true }]
 // ])
index 3fdc1fff0b1fe1619b54ec57e8e8b2c3a9540bc3..3d88f13f7b7b7dec2659efcb149e799da90a1ea0 100644 (file)
@@ -97,6 +97,7 @@ export function parse(content: string, options: ParserOptions = {}): RootNode {
     components: [],
     directives: [],
     hoists: [],
+    cached: 0,
     codegenNode: undefined,
     loc: getSelection(context, start),
     cached: 0
index ea82606cff0b8065be13019fe0f40056fe762396..a941b90d07d09275ce06332f3241dc4ba4a98167 100644 (file)
@@ -5,7 +5,7 @@ const comp = resolveComponent('comp')
 const foo = resolveDirective('foo')
 const bar = resolveDirective('bar')
 
-return applyDirectives(h(comp), [
+return withDirectives(h(comp), [
   [foo, this.x],
   [bar, this.y]
 ])
@@ -129,7 +129,7 @@ export function withDirectives(vnode: VNode, directives: DirectiveArguments) {
       applyDirective(vnode.props, instance, dir, value, arg, modifiers)
     }
   } else if (__DEV__) {
-    warn(`applyDirectives can only be used inside render functions.`)
+    warn(`withDirectives can only be used inside render functions.`)
   }
   return vnode
 }