Explorar el Código

搜索增加突出显示

hejq hace 8 años
padre
commit
dde901ea22
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      src/main/webapp/resources/js/common/base.js

+ 3 - 0
src/main/webapp/resources/js/common/base.js

@@ -98,6 +98,9 @@ function highlight(text, words, tag) {
  * @returns {*}
  */
 function highLightKeywords(text, words, tag) {
+    if (isEmpty(words)) {
+        return text;
+    }
     // 默认的标签,如果没有指定,使用span
     tag = tag || 'span';