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

110
Views
Vue.js + Activar solo un evento

Tengo el menú desplegable a continuación creado usando li y dentro del menú desplegable también quiero proporcionar la funcionalidad de eliminación. Si se hace clic en 'X', se debe eliminar el registro. Sin embargo, cuando hago clic en 'X', también se activa 'cambiar filtro', que también está dentro del mismo li. ¿Hay alguna forma de evitar que se active el 'cambio de filtro'?

ingrese la descripción de la imagen aquí A continuación se muestra el código -

 <ul> <li v-on:click="createNew">Create new Filter</li> <li v-for="item in filters.entities" v-on:click="filter.changeFilter(item.id,item.name)">{{ item.name }}<div title="Delete filter" v-on:click="delete(item.id)">x</div></li> </ul> //Inside js file delete: (itemId) => { var result = window.parent.Xrm.WebApi.deleteRecord('ice_filters', itemId.toString()); }
about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

Intente agregar el modificador de stop para detener la propagación del evento del elemento secundario al principal:

 <div title="Delete filter" v-on:click.stop="delete(item.id)">x</div>
about 4 years ago · Santiago Gelvez 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!