feat: applyDirectives
This commit is contained in:
parent
ba62deb5d9
commit
4974a47111
@ -71,3 +71,18 @@ export function applyDirective(
|
|||||||
}
|
}
|
||||||
return vnode
|
return vnode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type DirectiveArguments = [
|
||||||
|
Directive,
|
||||||
|
ComponentInstance,
|
||||||
|
any,
|
||||||
|
string | undefined,
|
||||||
|
DirectiveModifiers | undefined
|
||||||
|
][]
|
||||||
|
|
||||||
|
export function applyDirectives(vnode: VNode, directives: DirectiveArguments) {
|
||||||
|
for (let i = 0; i < directives.length; i++) {
|
||||||
|
applyDirective(vnode, ...directives[i])
|
||||||
|
}
|
||||||
|
return vnode
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user