Explorar o código

表格浮动提示单双引号转义

RuoYi %!s(int64=5) %!d(string=hai) anos
pai
achega
55978c7f15
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js

+ 3 - 2
ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js

@@ -274,10 +274,11 @@ var table = {
 				var _target = $.common.isEmpty(target) ? 'copy' : target;
 				if (_value.length > _length) {
 					_text = _value.substr(0, _length) + "...";
-					_value = _value.replace(/\'/g,"’");
+					_value = _value.replace(/\'/g,"'");
+					_value = _value.replace(/\"/g,""");
 					var actions = [];
 					actions.push($.common.sprintf('<input id="tooltip-show" style="opacity: 0;position: absolute;z-index:-1" type="text" value="%s"/>', _value));
-                	actions.push($.common.sprintf("<a href='###' class='tooltip-show' data-toggle='tooltip' data-target='%s' title='%s'>%s</a>", _target, _value, _text));
+                	actions.push($.common.sprintf('<a href="###" class="tooltip-show" data-toggle="tooltip" data-target="%s" title="%s">%s</a>', _target, _value, _text));
 					return actions.join('');
 				} else {
 					_text = _value;