Quellcode durchsuchen

查体体征最后一个标签不显示标点回退

zhouna vor 5 Jahren
Ursprung
Commit
071f21a235
1 geänderte Dateien mit 2 neuen und 4 gelöschten Zeilen
  1. 2 4
      src/common/components/EditableSpan/index.jsx

+ 2 - 4
src/common/components/EditableSpan/index.jsx

@@ -291,11 +291,9 @@ class EditableSpan extends Component{
     $(this.$span.current).attr({"contentEditable":true}).focus()
   }
   componentDidMount(){
-    const {preIsExt,afterIsExt,value} = this.props;
-    const br = preIsExt&&!afterIsExt;       //最后一个体征标签
-    const val = br&&!config.punctuationReg.test(value)?'':value;
+    const {value} = this.props;
     if(value){
-      this.$span.current.innerText?(this.$span.current.innerText = val||''):(this.$span.current.innerHTML = val||'');
+      this.$span.current.innerText?(this.$span.current.innerText = value||''):(this.$span.current.innerHTML = value||'');
     }
   }
   getClass(){