Browse Source

删除console

luolei 5 years ago
parent
commit
16c72f1b10
1 changed files with 0 additions and 9 deletions
  1. 0 9
      src/common/components/EditableSpan/index.jsx

+ 0 - 9
src/common/components/EditableSpan/index.jsx

@@ -233,7 +233,6 @@ class EditableSpan extends Component{
       let preObj = $(this.$span.current).prev();
       let nexVal = nexObj[0]&&nexObj[0].innerText || nexObj[0]&&nexObj[0].innerHTML; 
       if(preVal.trim().length==1&& !innerVal){
-        // console.log('delete前面是标签,内容为空时再删一次才移除标签;前面是文本,则直接移除')
         removeId && removeId({boxMark,i:index,text:"",flag:'del'});
         handleClear && handleClear({boxMark});//删除最后一个字时清空搜索结果,避免现病史搜索框不立即消失的情况
         //如果后一个不是标签,则光标移到最前
@@ -253,7 +252,6 @@ class EditableSpan extends Component{
           if(nextObj && nextObj[0] && nextObj[0].nodeName !=="DIV"){
             // IE浏览器focus光标在最后,其他浏览器在最前
             // nextObj.focus();
-            // console.log(this.props.data,this.props.data[index+1],2323223223)
             if(boxMark==2&&this.props.data[index+1]&&this.props.data[index+1].flag==3){
               this.moveEnd(nexObjN[0],1);
             }else{
@@ -264,14 +262,10 @@ class EditableSpan extends Component{
             index: null
           })*/
         }else if(indexNum ==innerVal.length&&nexObj[0]&&nexObj[0].nodeName=="DIV"){//span最后一位后面为div标签
-          // console.log(99)
           handleKeydown&&handleKeydown({boxMark,i:index+1,text:data,flag:'del'});
           this.moveEnd(nextObj[0]);
         }else if(nexObj[0]&&nexObj[0].nodeName=="SPAN"){
-          // console.log('delete text: '+config.punctuationReg.test(nexVal),nexVal,textIndex,innerVal)
           if(nexVal.length <= 1){//为空或者一个字delete时候
-            // console.log(8988998)
-            // handleChange&&handleChange({text1:'',boxMark,i:index+1});
             removeId && removeId({boxMark,i:index+1,text:"",flag:'del'});
             handleClear && handleClear({boxMark});
             this.moveEnd(nexObj[0])
@@ -291,7 +285,6 @@ class EditableSpan extends Component{
       let preObj = $(this.$span.current).prev();
       let curObj = $(this.$span.current);
       if(index!==0&&preVal.trim().length==1&& !innerVal){
-        // console.log('backspace前面是标签,内容为空时再删一次才移除标签;前面是文本,则直接移除')
         removeId && removeId({boxMark,i:index,text:""});
         handleClear && handleClear({boxMark});//删除最后一个字时清空搜索结果,避免现病史搜索框不立即消失的情况
         if(preObj[0].nodeName !=="DIV"){
@@ -321,7 +314,6 @@ class EditableSpan extends Component{
         // 后半段是处理IE
         if(index!==0 && !config.punctuationReg.test(data) || index!==0 && data=='<br>'||indexNum ==0&&preObj[0]&&preObj[0].nodeName=="DIV"){
           // let preObj = $(this.$span.current).prev();
-          // console.log('向前删除,前面是div')
           let obj = preObj[0].nodeName=="DIV"?preObj.prev():preObj;
           handleKeydown&&handleKeydown({boxMark,i:index,text:data,flag:'backsp'});
           this.moveEnd(obj[0]);
@@ -330,7 +322,6 @@ class EditableSpan extends Component{
           })
         }else if(textIndex == 0&&preObj[0]&&preObj[0].nodeName=="SPAN"){
           let data = preObj[0].innerText || preObj[0].innerHTML;
-          // console.log('向前删除,光标首位,前面是span',preObj[0],boxMark)
           if(data.length == 1){//span只有一个文本,删除后移除检索
             removeId && removeId({boxMark,i:index-1,text:""});
             handleClear && handleClear({boxMark});