소스 검색

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

cuiyalong 2 년 전
부모
커밋
60f42b39d2
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      src/jfw/modules/app/src/web/staticres/jyapp/js/common.js
  2. 1 1
      src/web/staticres/js/common.js

+ 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) {