提交 2ce07852 编写于 作者: EvanOne(文一)'s avatar EvanOne(文一)

fix: Solve the problem that the popAlert component pops up repeatedly

上级 7a208db7
...@@ -120,20 +120,21 @@ Stun.utils = Stun.$u = { ...@@ -120,20 +120,21 @@ Stun.utils = Stun.$u = {
error: 'times-circle' error: 'times-circle'
}; };
if (!$('.stun-alert')[0]) { if ($('.stun-message').length !== 0) {
var faPrefix = CONFIG.fontawesome.prefix; $('.stun-message').remove();
var $alert = $(
'<div class="stun-message">' +
'<div class="stun-alert stun-alert-' + status + '">' +
'<i class="stun-alert-icon ' + faPrefix + ' fa-' + icon[status] + '"></i>' +
'<span class="stun-alert-description">' + text + '</span>' +
'</div>' +
'</div>'
);
$('body').append($alert);
} }
var faPrefix = CONFIG.fontawesome.prefix;
var $alert = $(
'<div class="stun-message">' +
'<div class="stun-alert stun-alert-' + status + '">' +
'<i class="stun-alert-icon ' + faPrefix + ' fa-' + icon[status] + '"></i>' +
'<span class="stun-alert-description">' + text + '</span>' +
'</div>' +
'</div>'
);
$('body').append($alert);
$(document).ready(function () { $(document).ready(function () {
$('.stun-alert') $('.stun-alert')
.velocity('stop') .velocity('stop')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册