Pre Merge pull request !152 from 无木/master

pull/152/MERGE
无木 2019-11-21 10:00:23 +08:00 committed by Gitee
commit 2fba77f61f
1 changed files with 3 additions and 2 deletions

View File

@ -162,13 +162,14 @@ define(['fast', 'template', 'moment'], function (Fast, Template, Moment) {
var options = $.extend({}, $(that).data() || {}); var options = $.extend({}, $(that).data() || {});
var url = Backend.api.replaceids(that, $(that).attr('href')); var url = Backend.api.replaceids(that, $(that).attr('href'));
var title = $(that).attr("title") || $(that).data("title") || $(that).data('original-title'); var title = $(that).attr("title") || $(that).data("title") || $(that).data('original-title');
var icon=$(that).data("icon") || "fa fa-circle-o";
if (typeof options.confirm !== 'undefined') { if (typeof options.confirm !== 'undefined') {
Layer.confirm(options.confirm, function (index) { Layer.confirm(options.confirm, function (index) {
Backend.api.addtabs(url, title); Backend.api.addtabs(url, title, icon);
Layer.close(index); Layer.close(index);
}); });
} else { } else {
Backend.api.addtabs(url, title); Backend.api.addtabs(url, title, icon);
} }
return false; return false;
}); });