Skip to content

Add custom directive to Vue3 #1028

Answered by RobertBoes
rico asked this question in Help (Vue)
Dec 29, 2021 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

You should add the directive before the app is mounted, so like this

app.directive('autofocus', {
  // ...
})
app.mount(el)

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@rico
Comment options

@Mllexx
Comment options

Answer selected by rico
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants