Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
popupPrompt () {
promptManager
.info('Please tell us your age:', 'Prompt', {
ok: async val => {
await wait(1000)
let num = Number(val)
if (`${num}` !== val || num <= 0) {
this.$toast.error('Please enter a valid age.')
return false
}
}
})
.then(value => {
console.log(value)
})
}
}
popupPrompt () {
promptManager.info('Please tell us your age:', 'Prompt').then(value => {
console.log(value)
})
}
}