Skip to content

createApp with components and custom directives? #54

Answered by niutech
gingerchew asked this question in Q&A
Discussion options

You must be logged in to vote

What's wrong with createApp({FloatingLabelSelect}).directive('p-mask', phoneMask).mount('#formId')?
You can also split it to 3 lines:

const app = createApp({FloatingLabelSelect})
app.directive('p-mask', phoneMask)
app.mount('#formId')

Keep in mind that directives are prefixed with v-, so it will be v-p-mask.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gingerchew
Comment options

Answer selected by gingerchew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants