0๐
โ
If you plan to hardcode directive:
const component = createElement('input', {
directives: [
name: 'mask',
value: '##-##-##',
]
})
If you just want to pass it down through component, like: <InputBox v-mask="'##-##-##'" />
:
const component = createElement('input', {
...(data.directives?.length && {
directives: [data.directives[0]],
}),
})
It would accept just one directive, if you want to use multiple directives, then you just need to loop through them.
Source:stackexchange.com