فهرست منبع

查体搜索自由文本位置bug修改

zhouna 6 سال پیش
والد
کامیت
f8ab9c103e
2فایلهای تغییر یافته به همراه5 افزوده شده و 2 حذف شده
  1. 4 1
      src/containers/CheckBody.js
  2. 1 1
      src/store/actions/checkBody.js

+ 4 - 1
src/containers/CheckBody.js

@@ -1,7 +1,7 @@
 import {connect} from 'react-redux';
 import CheckBody from '@components/CheckBody';
 import {getModule,getInitData} from '@store/async-actions/fetchModules.js';
-import {HIDE,RESET,SETDROPSHOW} from '@store/types/homePage.js';
+import {HIDE,RESET,SETDROPSHOW,ISREAD} from '@store/types/homePage.js';
 import {SELECTSEARCHDATA} from "@store/types/checkBody";
 import {billing} from '@store/async-actions/pushMessage';
 
@@ -39,6 +39,9 @@ function mapDispatchToProps(dispatch,state){
             span,
             isReplace:false
           })
+          dispatch({
+            type:ISREAD
+          })
         }
       });
     },

+ 1 - 1
src/store/actions/checkBody.js

@@ -139,7 +139,7 @@ export function insertLabelData(state,action){
   const spreadLabels = data;
   const toEnd = showText.indexOf(searchStr)>0;    //替换前或后的搜索词(中间不可搜)
   let reg = toEnd?new RegExp(searchStr+"$"):new RegExp("^"+searchStr);
-  const newText=showText.replace(reg,'')||' ';
+  const newText=showText.replace(reg,'')||'';
   if(!isReplace){
     span.current.innerText = newText;
     const pText = Object.assign({},text,{value:newText});