pqina / flip

⏳ The online version of the classic flip clock
https://pqina.nl/flip/
MIT License
874 stars 89 forks source link

How does data-did-init work with vue? #61

Open aonghas opened 1 year ago

aonghas commented 1 year ago

How do I call the data-did-init method when implementing with Vue? The function is a string so I'm not sure how I can call something within a SFC in Vue? thanks!

rikschennink commented 1 year ago

Use Tick.DOM.create to create the counter and you can pass the init as a property.

var tick = Tick.DOM.create(element, {
    value: 1000,
    didInit: function(tick) {
        console.log('hello!');
    }
});