浏览代码

同类药物药品说明书图标

zhangxc 6 年之前
父节点
当前提交
b66c626558
共有 2 个文件被更改,包括 5 次插入5 次删除
  1. 3 3
      src/components/TreatDesc/index.jsx
  2. 2 2
      src/components/TreatDesc/index.less

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

@@ -26,11 +26,11 @@ class TreatDesc extends Component {
 
     handleMouseEnterDrug( index, item) {
         // console.log('item', item)
-        const drugNameWidth = parseInt($('#'+item.medicitionName)[0].offsetWidth)
+        // const drugNameWidth = parseInt($('#'+item.medicitionName)[0].offsetWidth)
         
-        const imgLeft = drugNameWidth/2-10
+        // const imgLeft = drugNameWidth/2-10
         // console.log('imgLeft', imgLeft)
-        $('#'+item.medicitionName).find('img').css('left', imgLeft)
+        // $('#'+item.medicitionName).find('img').css('left', imgLeft)
        
         this.setState({
             currentIndex: index,

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

@@ -61,10 +61,10 @@
 }
 .info-img {
     width: 15px;
-    margin: 0 3px -1px;
-    cursor: pointer;
     position: absolute;
     top: -15px;
+    left: 50%;
+    margin-left: -7px;
 }
 .info-flag {
     display: inline-block;