【发布时间】:2021-01-21 19:41:44
【问题描述】:
我正在使用甜蜜警报 2 将模态链接在一起。
我希望尽可能无缝地在模态之间进行过渡(使用 hideClass 和 showClass 删除动画。但是,当在模态之间按下继续时,仍然有一个非常明显的“闪烁”或闪烁。
这是我所拥有的:
Swal.mixin({
confirmButtonText: 'Continue',
confirmButtonColor: '#04D4CD',
})
.queue([
{
title: 'Welcome to blah blah!',
text: 'To get started we\'ll need some information from you',
imageUrl: 'https://unsplash.it/400/200',
imageWidth: 400,
imageHeight: 200,
hideClass: {
popup: '',
icon: '',
},
},
{
title: 'Question 2',
text: 'More text is here.',
imageUrl: 'https://unsplash.it/400/200',
imageWidth: 400,
imageHeight: 200,
showClass: {
popup: '',
icon: '',
},
hideClass: {
popup: '',
backdrop:'',
icon: '',
},
},
{
title: 'Question 3',
text: 'Thats it!',
imageUrl: 'https://unsplash.it/400/200',
imageWidth: 400,
imageHeight: 200,
confirmButtonText: 'Get Started',
showClass: {
popup: '',
icon: '',
},
}
])
还有一个可以看到闪光灯的代码笔 - https://codepen.io/matt-tailwise/pen/vYXMVGJ。
有没有办法去掉这个?
感谢您的帮助!
【问题讨论】:
标签: javascript sweetalert sweetalert2