refactor: adjust arguments
This commit is contained in:
parent
c206531330
commit
1a68bcb4a7
@ -31,8 +31,8 @@ const valueCache = new WeakMap<Directive, WeakMap<any, any>>()
|
|||||||
|
|
||||||
export function applyDirective(
|
export function applyDirective(
|
||||||
vnode: VNode,
|
vnode: VNode,
|
||||||
directive: Directive,
|
|
||||||
instance: ComponentInstance,
|
instance: ComponentInstance,
|
||||||
|
directive: Directive,
|
||||||
value?: any,
|
value?: any,
|
||||||
arg?: string,
|
arg?: string,
|
||||||
modifiers?: DirectiveModifiers
|
modifiers?: DirectiveModifiers
|
||||||
@ -74,7 +74,6 @@ export function applyDirective(
|
|||||||
|
|
||||||
type DirectiveArguments = [
|
type DirectiveArguments = [
|
||||||
Directive,
|
Directive,
|
||||||
ComponentInstance,
|
|
||||||
any,
|
any,
|
||||||
string | undefined,
|
string | undefined,
|
||||||
DirectiveModifiers | undefined
|
DirectiveModifiers | undefined
|
||||||
@ -82,10 +81,11 @@ type DirectiveArguments = [
|
|||||||
|
|
||||||
export function applyDirectives(
|
export function applyDirectives(
|
||||||
vnode: VNode,
|
vnode: VNode,
|
||||||
|
instance: ComponentInstance,
|
||||||
...directives: DirectiveArguments
|
...directives: DirectiveArguments
|
||||||
) {
|
) {
|
||||||
for (let i = 0; i < directives.length; i++) {
|
for (let i = 0; i < directives.length; i++) {
|
||||||
applyDirective(vnode, ...directives[i])
|
applyDirective(vnode, instance, ...directives[i])
|
||||||
}
|
}
|
||||||
return vnode
|
return vnode
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user