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

246
Views
¿Cómo obtener el tipo de componente en <configuración de script>?

Este código proviene de la documentación oficial y no usa defineComponent() para declarar componentes. Lo intenté y fallé, y webstorm falló.

 //App.vue <script setup lang="ts"> import {RouterLink, RouterView} from 'vue-router' import HelloWorld from '@/components/HelloWorld.vue' import MyModal from '@/views/MyModal.vue' // error: This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'. import { ref,nextTick } from 'vue' const modal1= ref(null) const modal2 = ref<InstanceType<typeof MyModal> | null>(null) const childOpen=()=>{ modal1.value.open() // it's working modal2.value?.open() // not working } </script> //MyModal.vue <script setup lang="ts"> import { ref } from 'vue' const isContentShown = ref(false) const open = () => { console.log(2131) isContentShown.value = !isContentShown.value } defineExpose({ open:open }) </script>
about 4 years ago · Juan Pablo Isaza
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!