0👍
✅
You have to use promises to get the user input of a swal modal.
async alertDisplay() {
let customer = await this.$swal({
title: 'What is your Name?',
input: 'text',
inputPlaceholder: 'Enter your name here',
showCloseButton: true,
});
console.log(customer)
}
You can see it in this Codepen found on the documentation :
https://codepen.io/pen/?&editable=true
Source:stackexchange.com