Browse Source

引用后同模式切换bug修改2093

zhouna 5 năm trước cách đây
mục cha
commit
fcc22c90a1
2 tập tin đã thay đổi với 4 bổ sung3 xóa
  1. 3 3
      src/components/Banner/index.jsx
  2. 1 0
      src/containers/TypeConfigContainer.js

+ 3 - 3
src/components/Banner/index.jsx

@@ -41,12 +41,12 @@ class Banner extends Component {
   }
 
   confirmType(){
-    const {typeConfig,confirmType,clearCommS,closeConfigModal} = this.props;
+    const {typeConfig,confirmType,clearCommS,closeConfigModal,readMode} = this.props;
     const mode = this.state.mode;
     // 清空主诉常见症状
     clearCommS();
-    if(mode==typeConfig){
-      closeConfigModal()
+    if(mode==typeConfig&&typeConfig==readMode){
+      closeConfigModal();
       return;
     }
     confirmType&&confirmType(mode);

+ 1 - 0
src/containers/TypeConfigContainer.js

@@ -27,6 +27,7 @@ function mapStateToProps(state) {
     hasMain:ifHasData(main.data,main.saveText),
     hasCurrent:ifHasData(current.data,current.saveText),
     hasOther:ifHasData(other.data,other.saveText),
+    readMode:typeConfig.readMode,       //回读模式
   };
 }