From c2743f949ef7fcfa73313e8037cceb3e74f71334 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 23 Feb 2022 16:57:07 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E8=8B=A5=E6=9C=AA=E5=8C=B9?= =?UTF-8?q?=E9=85=8D=E5=88=B0=E5=AD=97=E5=85=B8=E6=A0=87=E7=AD=BE=E5=88=99?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=8E=9F=E5=AD=97=E5=85=B8=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/static/ruoyi/js/ry-ui.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 382330b3f..b110f6fd5 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 @@ -539,6 +539,9 @@ var table = { return false; } }); + if (actions.length === 0) { + actions.push($.common.sprintf("%s", value)) + } return actions.join(''); }, // 回显数据字典(字符串数组) @@ -549,13 +552,18 @@ var table = { var currentSeparator = $.common.isEmpty(separator) ? "," : separator; var actions = []; $.each(value.split(currentSeparator), function(i, val) { + var match = false $.each(datas, function(index, dict) { if (dict.dictValue == ('' + val)) { var listClass = $.common.equals("default", dict.listClass) || $.common.isEmpty(dict.listClass) ? "" : "badge badge-" + dict.listClass; - actions.push($.common.sprintf("%s ", listClass, dict.dictLabel)); + actions.push($.common.sprintf("%s", listClass, dict.dictLabel)); + match = true return false; } }); + if (!match) { + actions.push($.common.sprintf(" %s ", val)); + } }); return actions.join(''); },