Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
mounted () {
// Ladda Buttons
ladda.bind('div:not(.progress-demo) .ladda-button', { timeout: 2000 })
// Bind progress buttons and simulate loading progress
ladda.bind('.progress-demo button', {
callback: function (instance) {
let progress = 0
let interval = setInterval(function () {
progress = Math.min(progress + Math.random() * 0.1, 1)
instance.setProgress(progress)
if (progress === 1) {
instance.stop()
clearInterval(interval)
}
}, 200)
}
})
}
}
mounted () {
// Ladda Buttons
ladda.bind('div:not(.progress-demo) .ladda-button', { timeout: 2000 })
// Bind progress buttons and simulate loading progress
ladda.bind('.progress-demo button', {
callback: function (instance) {
let progress = 0
let interval = setInterval(function () {
progress = Math.min(progress + Math.random() * 0.1, 1)
instance.setProgress(progress)
if (progress === 1) {
instance.stop()
clearInterval(interval)
}
}, 200)
}
})