修复自定义字典样式不生效的问题

pull/472/MERGE
RuoYi 1 year ago
parent 24d21eda23
commit fbeacbb026

@ -541,7 +541,8 @@ var table = {
$.each(datas, function(index, dict) {
if (dict.dictValue == ('' + value)) {
var listClass = $.common.equals("default", dict.listClass) || $.common.isEmpty(dict.listClass) ? "" : "badge badge-" + dict.listClass;
actions.push($.common.sprintf("<span class='%s'>%s</span>", listClass, dict.dictLabel));
var cssClass = $.common.isNotEmpty(dict.cssClass) ? dict.cssClass : listClass;
actions.push($.common.sprintf("<span class='%s'>%s</span>", cssClass, dict.dictLabel));
return false;
}
});

@ -88,7 +88,8 @@
title: '字典标签',
formatter: function(value, row, index) {
var listClass = $.common.equals("default", row.listClass) || $.common.isEmpty(row.listClass) ? "" : "badge badge-" + row.listClass;
return $.common.sprintf("<span class='%s'>%s</span>", listClass, value);
var cssClass = $.common.isNotEmpty(row.cssClass) ? row.cssClass : listClass;
return $.common.sprintf("<span class='%s'>%s</span>", cssClass, value);
}
},
{

Loading…
Cancel
Save