Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Custom directivesΒ #104

Closed
Closed
@TheAlexLichter

Description

@TheAlexLichter

Hey πŸ‘‹πŸ»

I was wondering whether custom directives are supported inside the <script setup> tag.
From my current test it seems they are not but I might do sth. wrong πŸ€”

Example component:

<script setup>
// enables v-focus in templates
const vFocus = {
  mounted: (el) => el.focus()
}
</script>
1
<template>
  <input v-focus />
</template>

UPDATE

Seems that const focus = {} works but const vFocus = {} does not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions