Parcourir la source

字典数据列表标签显示样式

RuoYi il y a 5 ans
Parent
commit
f8491c36e2

+ 5 - 1
ruoyi-admin/src/main/resources/templates/system/dict/data/data.html

@@ -82,7 +82,11 @@
 					},
 					{
 						field: 'dictLabel',
-						title: '字典标签'
+						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);
+						}
 					},
 					{
 						field: 'dictValue',