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

558
Views
TypeError: binding.value no es una función Vue js v-click-outside

estoy usando v-click-outside y quiero pasar valor a la función pero tengo un error

ingrese la descripción de la imagen aquí

ingrese la descripción de la imagen aquí

Así es como estoy pasando un valor ingrese la descripción de la imagen aquí

Aquí está mi código del archivo Main.js

 vue_app.directive('click-outside', { beforeMount(el, binding, vnode) { el.clickOutsideEvent = evt => { evt.stopPropagation() if (!(el === evt.target || el.contains(evt.target))) { binding.value(evt, el) } } // Wait 1 frame otherwise a potential click that mounted the element will immediately trigger a click-outside event: window.requestAnimationFrame(() => { document.addEventListener('click', el.clickOutsideEvent) }) }, unmounted(el) { document.removeEventListener('click', el.clickOutsideEvent) }, });
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Tiene que pasar una función a la directiva, pero en este momento la llama de inmediato y pasa el valor devuelto. Entonces, en lugar de

 v-click-outside="hideAllShowDetailDropdown(show.show_ID)"

Prueba esto:

 v-click-outside="() => hideAllShowDetailDropdown(show.show_ID)"
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!