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

201
Views
¿Cómo definir `name` y `inheritAttrs` en `<configuración de script>`?

API de opciones:

 <script> import { defineComponent } from 'vue' export default defineComponent({ name: 'CustomName', // 👈 inheritAttrs: false, // 👈 setup() { return {} }, }) </script>

¿Cómo hacer eso en <script setup> , hay un equivalente para name y inheritAttrs como defineProps y defineEmits ?

 <script setup> // 👉 how to define them here? </script>
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

La sintaxis <script setup> brinda la capacidad de expresar una funcionalidad equivalente a la mayoría de las opciones de API de opciones existentes, excepto algunas:

  • name
  • inheritAttrs
  • Opciones personalizadas que necesitan los complementos o las bibliotecas

Si necesita declarar estas opciones, use un bloque <script> normal separado con export default :

 <script> export default { name: 'CustomName', inheritAttrs: false, customOptions: {}, } </script> <script setup> // script setup logic </script>

Salida compilada:

 <script> export default { name: 'CustomName', inheritAttrs: false, customOptions: {}, setup() { // script setup logic }, } </script>
over 4 years ago · Santiago Trujillo 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!