【发布时间】:2022-01-21 18:15:56
【问题描述】:
我正在寻找一种方法来查找是否可以将 sweetalert 2 中复选框的位置从中心更改为上部位置?我使用了这段代码:
(async () => {
const { value: accept } = await Swal.fire({
title: 'Terms and conditions',
input: 'checkbox',
inputValue: 1,
inputPlaceholder:
'Yes, I agree to receive an email, including educational materials, product and company announcements, and community even information, from T&C. I can unsubscribe at any time. I would like to opt into receiving marketing communications as outlined above.',
confirmButtonText:
'Continue <i class="fa fa-arrow-right"></i>',
inputValidator: (result) => {
return !result && 'You need to agree with T&C'
}
})
if (accept) {
Swal.fire('You agreed with T&C :)')
}
})()
我想将复选框从中心更改为“是”字的位置。
【问题讨论】:
标签: checkbox sweetalert2