From fbeacbb026be276baa515d3f60648020073968d2 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 14 Sep 2023 17:46:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=AD=97=E5=85=B8=E6=A0=B7=E5=BC=8F=E4=B8=8D=E7=94=9F=E6=95=88?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js | 3 ++- .../src/main/resources/templates/system/dict/data/data.html | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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); } }, {