1、text

swal({
  title: 'Input something',
  input: 'text',
  showCancelButton: true,
  inputValidator: function (value) {
    return new Promise(function (resolve, reject) {
      if (value) {
        resolve()
      } else {
        reject('You need to write something!')
      }
    })
  }
}).then(function (result) {
  swal({
    type: 'success',
    html: 'You entered: ' + result
  })
})
View Code

相关文章:

  • 2022-12-23
  • 2022-01-28
  • 2021-10-12
  • 2021-07-12
  • 2022-12-23
  • 2021-11-21
  • 2021-12-05
猜你喜欢
  • 2022-01-20
  • 2021-12-16
  • 2021-06-29
  • 2022-01-15
  • 2022-12-23
  • 2021-08-25
  • 2022-12-23
相关资源
相似解决方案