Bladeren bron

拖拽弹窗拖拽关闭图标bug

Luolei 6 jaren geleden
bovenliggende
commit
bcf167d459

+ 2 - 1
src/components/Treat/index.jsx

@@ -59,7 +59,8 @@ class Treat extends Component {
                 <div className={style['treat-mask']} onClick={this.hideTreat}>
                 </div>
                 <div id="treatWrapper" className={style['treat-box']}  onselectstart="return false" style={{zIndex:zIndex}}>
-                    <div onMouseDown={this.setTreatBox} id="dragTreatTitle" className={style['treat-title']}>治疗方案 ({treatItem.name})<img onClick={this.hideTreat} src={close}/></div>
+                    <img className={style.close} onClick={this.hideTreat} src={close}/>
+                    <div onMouseDown={this.setTreatBox} id="dragTreatTitle" className={style['treat-title']}>治疗方案 ({treatItem.name})</div>
 
                     <div className={style['treat-inner-box']}>
                         <GeneralTreat icon={generalIcon} title='一般治疗'   generalTreat={generalTreat}></GeneralTreat>

+ 6 - 0
src/components/Treat/index.less

@@ -14,6 +14,12 @@
     // z-index: 301;
     z-index: 300;
 }
+.close {
+  position: absolute;
+  z-index:9999;
+  top: 0;
+  right: 0;
+}
 .treat-mask {
     position: fixed;
     width: 100%;

+ 2 - 1
src/components/TreatDesc/DrugInfo/index.jsx

@@ -57,7 +57,8 @@ class DrugInfo extends Component {
         const { drugInfo, hideDrugInfo, drugInfoList,hideDrugInfoMore } = this.props
         const { currentIndex,zIndex } = this.state
         return (<div className={style['drug-info-wrapper']} id="drugWrapper" style={{zIndex:zIndex}}>
-                <h3 onMouseDown={this.setDragBox} id="drugTitle" className={style['drug-title']}>{drugInfo.title}说明书  <img src={close} onClick={hideDrugInfo} className={style['close-drug-desc']}/> </h3>
+                <img src={close} onClick={hideDrugInfo} className={style['close-drug-desc']}/>
+                <h3 onMouseDown={this.setDragBox} id="drugTitle" className={style['drug-title']}>{drugInfo.title}说明书  </h3>
                 { drugInfo && drugInfo.drugDesc.length > 0 && <div className={style['drug-desc-wrapper']} id='drugDesc' onScroll={this.handleScrollModal.bind(this,  drugInfo.drugDesc)}>
                     <div className={style['drug-title1']} >{drugInfo.title}说明书</div>
                     {drugInfo.drugDesc.map((item, index) =>{

+ 2 - 0
src/components/TreatDesc/DrugInfo/index.less

@@ -36,6 +36,8 @@
 .close-drug-desc {
     position: absolute;
     right: 0;
+    top: 0;
+    z-index: 9999;
     width: 40px;
 }
 .drug-desc-item {