zhouna 6 роки тому
батько
коміт
8a8015df63
1 змінених файлів з 3 додано та 5 видалено
  1. 3 5
      src/common/components/EditableSpan/index.jsx

+ 3 - 5
src/common/components/EditableSpan/index.jsx

@@ -3,6 +3,8 @@ import style from './index.less';
 import config from "@config/index";
 import {filterArr,isIE} from '@utils/tools.js';
 import Notify from '../Notify/index.js';
+
+import $ from 'jquery';
 /*****
  * author:zn@2018-12-10
  * 自由文本输入组件
@@ -125,9 +127,6 @@ class EditableSpan extends Component{
   }
   handleKeyup(e){
      const {boxMark,handleKeydown,i,value} = this.props;
-     const {preVal,index} = this.state;//console.log(22,i,index);
-    let innerVal = e.target.innerText;
-    if(e.keyCode==8){
      const {preVal,index} = this.state;
     const ev = e||window.event;
     const target = ev.target||ev.srcElement;
@@ -142,11 +141,10 @@ class EditableSpan extends Component{
         handleKeydown&&handleKeydown({boxMark,i:index});
         this.setState({
           // index:index-1 //连续往前删除,体验不佳
-          index:null
+          index: null
         })
       }
     }
-    
   }
   /*shouldComponentUpdate(next){
     if(JSON.stringify(next) == JSON.stringify(this.props)){