Code Monkey home page Code Monkey logo

Comments (5)

mlinquan avatar mlinquan commented on June 22, 2024

Hello, I have used vue awesome countdown in Vue 2. My vue-awesome-countdown verson is 1.0.24..

Technically it works fine but from time to time there will be a time deduction delay of one second then it will just be deducted by 2 seconds. Below is my snippet

<template>
  <div>
    <vac ref="countdown" :left-time="msBeforeDraw" @finish="fresh">
          <p slot="process" slot-scope="{ timeObj }" class="mb-0">
            <small class="drawInfo">Countdown</small>
            <span v-if="timeObj.h !== '00'" class="colorMain"
              >{{ timeObj.h }}:</span
            >
            <span class="colorMain">{{ timeObj.m }}:</span>
            <span class="colorMain">{{ timeObj.s }}</span>
          </p>
          <span slot="finish" class="opening  drawInfo">
            <small>Countdown</small>
            <span class="colorMain">开奖中</span>
          </span>
        </vac>
  </div>
</template>

<script>
export default {
  data(){
    return {msBeforeDraw: 600}
  }
  methods: {
    async fresh() {
      await this.$parent.fetchKey()
      setTimeout(() => {
        if (this.$refs.countdown) {
          this.$refs.countdown.startCountdown(true)
        }
      }, 1000)
    }
  }
}
</script>

The bug was fixed in version 1.0.28.
Please update the version and enjoy it.

from vue-awesome-countdown.

Dean-Christian-Armada avatar Dean-Christian-Armada commented on June 22, 2024

It still happened even after upgrading to 1.0.28 but there are improvements.. For example within 60 seconds it only occurred 3 times

from vue-awesome-countdown.

mlinquan avatar mlinquan commented on June 22, 2024

It still happened even after upgrading to 1.0.28 but there are improvements.. For example within 60 seconds it only occurred 3 times

Please update to the latest version 1.1.2 and try again

from vue-awesome-countdown.

Dean-Christian-Armada avatar Dean-Christian-Armada commented on June 22, 2024

Looks like it really is fixed! Thanks!

from vue-awesome-countdown.

inbound-be avatar inbound-be commented on June 22, 2024

I am using version 1.1.2 and am experiencing the same issue unfortunately.
Several times I see the countdown jumping by two seconds.

EDIT: Apparently if I use {{ Math.ceil(timeObj.org.s) }} instead of {{ timeObj.s }} it seems to be working fine.

from vue-awesome-countdown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.