Coder Social home page Coder Social logo

What the bug?? about vue-countdown HOT 5 CLOSED

fengyuanchen avatar fengyuanchen commented on July 21, 2024
What the bug??

from vue-countdown.

Comments (5)

fengyuanchen avatar fengyuanchen commented on July 21, 2024 1

The count is an internal property, please don't use or change it outside.

from vue-countdown.

ThunderBirdsX3 avatar ThunderBirdsX3 commented on July 21, 2024

Ahhhh!!! Add this.$refs.countdownBid.endTime = Date.now() + 10000; after this.$refs.countdownBid.count = 10000; will not get this issue.

But it have some thing I observe, It about refocus page window.addEventListener('focus', this.onFocus = this.update.bind(this)); if I set interval = 1000 it would see some different in countdown when refocus page.

from vue-countdown.

ThunderBirdsX3 avatar ThunderBirdsX3 commented on July 21, 2024

@fengyuanchen How can I do. this.$refs.countdownBid.time = 10000;?

Or change

this.$refs.countdownBid.count = 10000;
this.$refs.countdownBid.endTime = Date.now() + 10000;

To

this.$refs.countdownBid.init();

Countdown template

<countdown v-if="counting" :time="count" :interval="100" tag="p" @countdownend="bidEnd" ref="countdownBid">
    <template scope="props">
        <h1 class="counting">{{ props.seconds }}</h1>
    </template>
</countdown>

from vue-countdown.

fengyuanchen avatar fengyuanchen commented on July 21, 2024

Why not just change the time property?!

from vue-countdown.

ThunderBirdsX3 avatar ThunderBirdsX3 commented on July 21, 2024

@fengyuanchen Nope it does not work.

from vue-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.