Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

189
Views
Cómo registrar una directiva personalizada en vue 3 <configuración de script>

No puedo encontrar esto en los documentos. Solo hay información sobre cómo registrarlo globalmente en la app

¿Es posible registrar una directiva de ámbito personalizado con <script setup> ?

Si uso un script normal, tengo algo como esto:

 <script> import { defineComponent } from 'vue' import { customDirective } from './customDirective'; export default defineComponent({ directives: { customDirective } }) </script>

Ahora con <script setup> :

 <script setup> // how to register this import { customDirective } from './customDirective'; </script>

si lo dejo asi me sale el error en la consola

Failed to resolve directive

Cualquier ayuda es apreciada

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Debe resolverlo con el prefijo v .

 <script setup> import { customDirective as vCustomDirective } from './customDirective'; </script>

Ver los documentos .

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!