diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js index bf50dec46..fe9f033f7 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js @@ -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("%s", listClass, dict.dictLabel)); + var cssClass = $.common.isNotEmpty(dict.cssClass) ? dict.cssClass : listClass; + actions.push($.common.sprintf("%s", cssClass, dict.dictLabel)); return false; } }); diff --git a/ruoyi-admin/src/main/resources/templates/system/dict/data/data.html b/ruoyi-admin/src/main/resources/templates/system/dict/data/data.html index 6b13b601c..917f51531 100644 --- a/ruoyi-admin/src/main/resources/templates/system/dict/data/data.html +++ b/ruoyi-admin/src/main/resources/templates/system/dict/data/data.html @@ -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("%s", listClass, value); + var cssClass = $.common.isNotEmpty(row.cssClass) ? row.cssClass : listClass; + return $.common.sprintf("%s", cssClass, value); } }, {