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

350
Views
Por qué mi lista desplegable funciona más lentamente en Firefox que en Chrome

Mi lista desplegable se abre mucho más rápido en Chrome

pero en firefox se abre más lento

Uso transiciones en Nuxt con métodos para manejar pasos de transición.

Funciona bien en ambos pero es más lento en Firefox

 <transition v-on:before-enter="beforeEnter" v-on:enter="enterCoins" v-on:leave="leave"> <ul v-if="coinsBox"> <li v-if="live_prices.length > 0" v-for="(currency,index) in live_prices" @click="activeCoin = index;activeCoinChange();coinsBox=false" :class="{active:activeCoin === index}"> <div class="coin"> <img :src="'/imgs/coins/'+currency.symbol.toLowerCase()+'.svg'" alt="" v-else> <span class="name en">{{ currency.symbol }}&nbsp;-&nbsp;</span> </div> </li> </ul> </transition>

y estos son los métodos que utilicé:

 beforeEnter(el) { el.style.height = 0; el.style.overflow = "auto"; }, enterCoins(el, done) { let maxHeight; if (this.live_prices.length <= 3 && this.live_prices.length > 0) { maxHeight = this.live_prices.length * 56 } else { maxHeight = 224 } this.increaseHeight(el, done, maxHeight) }, increaseHeight(el, done, maxHeight) { clearInterval(this.leaveInterval); const increaseHeight = () => { let elHeight = parseInt(el.style.height) if (elHeight < maxHeight) { const height = `${parseInt(el.style.height) + 5}px`; el.style.height = height; } else { clearInterval(this.enterInterval); done(); } }; this.enterInterval = setInterval(increaseHeight, 5); }, leave(el, done) { clearInterval(this.enterInterval); const decreaseHeight = () => { let elHeight = parseInt(el.style.height) if (elHeight > 0) { const height = `${parseInt(el.style.height) - 5}px`; el.style.height = height; } else { clearInterval(this.leaveInterval); done(); } }; this.leaveInterval = setInterval(decreaseHeight, 5); },

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!