From 1a68bcb4a74f1db9ef6eeaa5828b67c2abe4fb4c Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 9 Oct 2018 18:33:08 -0400 Subject: [PATCH] refactor: adjust arguments --- packages/core/src/optional/directive.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/src/optional/directive.ts b/packages/core/src/optional/directive.ts index 7c0df6a8..fc756b7a 100644 --- a/packages/core/src/optional/directive.ts +++ b/packages/core/src/optional/directive.ts @@ -31,8 +31,8 @@ const valueCache = new WeakMap>() export function applyDirective( vnode: VNode, - directive: Directive, instance: ComponentInstance, + directive: Directive, value?: any, arg?: string, modifiers?: DirectiveModifiers @@ -74,7 +74,6 @@ export function applyDirective( type DirectiveArguments = [ Directive, - ComponentInstance, any, string | undefined, DirectiveModifiers | undefined @@ -82,10 +81,11 @@ type DirectiveArguments = [ export function applyDirectives( vnode: VNode, + instance: ComponentInstance, ...directives: DirectiveArguments ) { for (let i = 0; i < directives.length; i++) { - applyDirective(vnode, ...directives[i]) + applyDirective(vnode, instance, ...directives[i]) } return vnode }