Jelajahi Sumber

fix: common.js关键词替换修复

cuiyalong 2 tahun lalu
induk
melakukan
60f42b39d2

+ 1 - 1
src/jfw/modules/app/src/web/staticres/jyapp/js/common.js

@@ -998,7 +998,7 @@ function keyWordHighlight (value, oldChars, newChar) {
       lastArr.push(item)
     }
   })
-  if (lastArr.length === 0) {
+  if (lastArr.length === 0 && notStrReplacer.length === 0) {
     return value
   }
   lastArr = lastArr.sort(function (a, b) {

+ 1 - 1
src/web/staticres/js/common.js

@@ -345,7 +345,7 @@ function keyWordHighlight (value, oldChars, newChar) {
       lastArr.push(item)
     }
   })
-  if (lastArr.length === 0) {
+  if (lastArr.length === 0 && notStrReplacer.length === 0) {
     return value
   }
   lastArr = lastArr.sort(function (a, b) {